body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: var(--page-bg);
    color: var(--text-color);
}

:root {
    --page-bg: #f7f8fb;
    --surface: #ffffff;
    --surface-muted: #f9fafb;
    --text-color: #1f2937;
    --muted-text: #6b7280;
    --header-bg: #111827;
    --header-text: #ffffff;
    --button-bg: #2563eb;
    --button-text: #ffffff;
    --border-color: #d1d5db;
    --card-shadow: rgba(15, 23, 42, 0.08);
}

.theme-dark {
    --page-bg: #0f172a;
    --surface: #111827;
    --surface-muted: #17233d;
    --text-color: #e2e8f0;
    --muted-text: #94a3b8;
    --header-bg: #0f172a;
    --header-text: #f8fafc;
    --button-bg: #2563eb;
    --button-text: #ffffff;
    --border-color: #334155;
    --card-shadow: rgba(15, 23, 42, 0.3);
}

.container {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-header a {
    color: var(--header-text);
    text-decoration: none;
    margin-right: 1rem;
}

.site-header nav a.active {
    border-bottom: 2px solid #f59e0b;
}

.header-brand,
.header-nav,
.theme-toggle {
    display: inline-flex;
    align-items: center;
}

.header-brand {
    flex: 1;
}

.header-nav {
    gap: 1rem;
}

.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--header-text);
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.hero {
    padding: 2rem 0 1rem;
}

.layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 1rem;
}

.meta {
    color: #6b7280;
    font-size: 0.9rem;
}

input, textarea, select, button {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 0.25rem;
    box-sizing: border-box;
    background: var(--surface);
    color: var(--text-color);
}

button {
    width: auto;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    cursor: pointer;
}

.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px var(--card-shadow);
    margin-bottom: 1rem;
}

.site-footer {
    background: var(--header-bg);
    color: var(--surface);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.hero {
    padding: 2rem 0 1rem;
}

.meta {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.message.success { color: #22c55e; }
.message.error { color: #f87171; }

@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .site-header .container {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .header-nav {
        flex-wrap: wrap;
    }
}
