:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --border: #334155;
    --radius: 12px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active {
    color: var(--accent);
}

main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

.meta-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #0f172a;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.grid-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.grid-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.grid-card h3 {
    margin-top: 0;
}

.error-container {
    text-align: center;
    padding: 3rem 1rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
}

footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .card {
        padding: 1.5rem;
    }
}
