:root {
    --bg-light: #f5f5f7;
    --bg-dark: #020617;

    --card-light: #ffffff;
    --card-dark: #0b1220;

    --text-light: #020617;
    --text-dark: #e5e7eb;

    --muted-light: #6b7280;
    --muted-dark: #9ca3af;

    --accent: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.1);

    --border-soft: rgba(148, 163, 184, 0.4);

    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.32);
    --shadow-subtle: 0 10px 24px rgba(15, 23, 42, 0.20);

    --transition-fast: 0.16s ease-out;
}

/* Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", sans-serif;
}

body {
    padding: 18px;
    min-height: 100vh;
}

/* Backgrounds */
body.light {
    background: radial-gradient(circle at top, #e0e7ff, #f5f5f7 40%, #e5e7eb);
    color: var(--text-light);
}

body.dark {
    background: radial-gradient(circle at top, #1e293b, #020617 45%, #020617);
    color: var(--text-dark);
}

/* Layout */
.layout {
    max-width: 1120px;
    margin: 0 auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Topbar */
.topbar {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

body.light .topbar {
    background: rgba(248, 250, 252, 0.92);
}

body.dark .topbar {
    background: rgba(15, 23, 42, 0.96);
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #f9fafb;
}

.brand-text h1 {
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.brand-text span {
    font-size: 0.8rem;
    color: var(--muted-light);
}

body.dark .brand-text span {
    color: var(--muted-dark);
}

/* Nav actions */
.nav-actions {
    display: flex;
    gap: 10px;
}

.nav-btn {
    border-radius: 999px;
    padding: 7px 16px;
    border: 1px solid var(--border-soft);
    background: transparent;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.nav-btn.ghost:hover {
    background: rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow-subtle);
    transform: translateY(-1px);
}

.nav-btn.primary {
    background: var(--accent);
    border-color: transparent;
    color: #f9fafb;
    font-weight: 500;
}

.nav-btn.primary:hover {
    box-shadow: var(--shadow-subtle);
    transform: translateY(-1px);
}

/* Hero */
.hero-card {
    border-radius: var(--radius-xl);
    padding: 26px 24px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    max-width: 1120px;
}

body.light .hero-card {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.97), #eef2ff);
}

body.dark .hero-card {
    background: radial-gradient(circle at top left, #1e293b, #020617);
}

.hero-card h2 {
    font-size: 1.9rem;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
}

.hero-card p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 620px;
    color: var(--muted-light);
}

body.dark .hero-card p {
    color: var(--muted-dark);
}

.hero-card strong {
    color: var(--accent);
}

.hero-highlights {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.03);
}

body.dark .chip {
    background: rgba(15, 23, 42, 0.7);
}

/* Auth grid */
.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.card {
    border-radius: var(--radius-lg);
    padding: 18px 18px 20px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-subtle);
}

body.light .card {
    background: var(--card-light);
}

body.dark .card {
    background: var(--card-dark);
}

.auth-card h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--muted-light);
    margin-bottom: 14px;
}

body.dark .card-subtitle {
    color: var(--muted-dark);
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    padding: 8px 10px;
    font-size: 0.9rem;
    background: transparent;
    color: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5);
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.hint {
    font-size: 0.75rem;
    color: var(--muted-light);
}

body.dark .hint {
    color: var(--muted-dark);
}

/* Buttons */
.btn {
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    padding: 8px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    background: transparent;
    color: inherit;
}

.btn.primary {
    background: var(--accent);
    border-color: transparent;
    color: #f9fafb;
    font-weight: 500;
}

.btn.primary.full {
    width: 100%;
    justify-content: center;
}

.btn.primary:hover {
    box-shadow: var(--shadow-subtle);
    transform: translateY(-1px);
}

/* Checkbox */
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.checkbox input {
    width: 14px;
    height: 14px;
}

/* Form footer */
.form-footer {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.form-footer.stacked {
    flex-direction: column;
    align-items: flex-start;
}

/* Feed */
.feed-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-header h3 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* Feed locked vs content
   Du kannst später mit JS einfach body.classList.add('authenticated')
*/
.feed-locked {
    margin-top: 6px;
}

.feed-content {
    margin-top: 6px;
}

/* Standard: nicht eingeloggt */
body:not(.authenticated) .feed-content {
    display: none;
}

body:not(.authenticated) .feed-locked {
    display: block;
}

/* Eingeloggt */
body.authenticated .feed-locked {
    display: none;
}

body.authenticated .feed-content {
    display: block;
}

/* Composer */
.post-composer {
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.composer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* File input */
.file-input {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    border: 1px dashed var(--border-soft);
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
}

.file-input input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Posts */
.post {
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    margin-bottom: 4px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--muted-light);
}

body.dark .post-meta {
    color: var(--muted-dark);
}

.post-author {
    font-weight: 500;
}

.post-tag {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    font-size: 0.7rem;
}

.post-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .hero-card {
        padding: 20px 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .composer-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-actions {
        justify-content: flex-start;
    }
}


/* --- Zusätzliche Styles für Unterseiten --- */

.page-header {
    margin-bottom: 10px;
}

.page-header h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.rules-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rules-section h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.rules-section p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Settings grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.settings-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.danger-card {
    border-color: rgba(248, 113, 113, 0.7);
}

.btn.danger {
    background: #ef4444;
    border-color: transparent;
    color: #f9fafb;
}

.btn.danger:hover {
    box-shadow: var(--shadow-subtle);
    transform: translateY(-1px);
}

/* Select input */
.select-input {
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    padding: 8px 10px;
    font-size: 0.9rem;
    background: transparent;
    color: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.select-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5);
}

/* Legal text */
.legal-card h3 {
    margin-top: 14px;
    margin-bottom: 4px;
    font-size: 1rem;
}

.legal-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 6px;
}

.legal-list {
    margin: 4px 0 6px 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Report card */
.report-card {
    max-width: 720px;
}

/* Responsive Anpassungen */
@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}


/* Startseiten Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}


/* Theme Toggle Button */
.theme-btn {
    font-size: 1.2rem;
    padding: 6px 12px;
}

.theme-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}
