/* ========================================
   WebChess - Haupt-Stylesheet (Dark Theme)
   ======================================== */

/* CSS-Variablen */
:root,
[data-theme="dark"] {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #1a1a2e;
    --bg-hover: #1f2b47;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --accent: #c9a84c;
    --accent-hover: #d4b95d;
    --accent-dark: #a88a3a;
    --success: #4caf50;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --border: #2a2a40;
    --shadow: rgba(0, 0, 0, 0.3);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --nav-height: 64px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f0f0f0;
    --bg-hover: #e8e8e8;
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #888;
    --accent: #b8941f;
    --accent-hover: #c9a84c;
    --accent-dark: #8a6f15;
    --border: #ddd;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.nav-cta {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

.nav-link.nav-cta:hover {
    background: var(--accent-hover);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-icon {
    position: relative;
    color: var(--text-secondary);
    font-size: 1.3rem;
    padding: 0.4rem;
}

.nav-icon:hover {
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Avatar-Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.3rem;
    border-radius: var(--radius);
}

.nav-avatar-btn:hover {
    background: var(--bg-hover);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.nav-username {
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 180px;
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 100;
    overflow: hidden;
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
}

/* Play Dropdown */
.nav-play-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-play-btn {
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-play-btn:hover {
    background: var(--accent-hover);
}

.nav-play-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 200;
    overflow: hidden;
}

.nav-play-dropdown.open .nav-play-menu {
    display: block;
}

.nav-play-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-play-menu a:hover {
    background: var(--bg-hover);
}

@media (max-width: 768px) {
    .nav-play-dropdown { width: 100%; justify-content: center; }
    .nav-play-menu {
        position: static;
        box-shadow: none;
        border: none;
        display: none;
        width: 100%;
        text-align: center;
    }
    .nav-play-dropdown.open .nav-play-menu { display: block; }
    .nav-play-menu a { justify-content: center; }
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* Sprach-Umschalter */
.lang-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 3px;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.2s;
}

/* ========================================
   Hauptinhalt
   ======================================== */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--accent);
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ========================================
   Karten
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
    font-size: 1.2rem;
    color: var(--accent);
}

/* ========================================
   Formulare
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* Passwort Toggle */
.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.pw-toggle:hover {
    color: var(--accent);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.3rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ========================================
   Alerts / Flash-Nachrichten
   ======================================== */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
    border-color: rgba(76, 175, 80, 0.3);
}

.alert-danger,
.alert-error {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border-color: rgba(231, 76, 60, 0.3);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
    border-color: rgba(243, 156, 18, 0.3);
}

.alert-info {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
    border-color: rgba(52, 152, 219, 0.3);
}

/* ========================================
   Tabellen
   ======================================== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover {
    background: var(--bg-hover);
}

/* ========================================
   Auth-Seiten (Login, Register)
   ======================================== */
.auth-container {
    max-width: 440px;
    margin: 2rem auto;
}

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

.auth-card h1 {
    font-size: 1.8rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    font-weight: 500;
}

/* ========================================
   Paginierung
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-link:hover,
.page-link.active {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ========================================
   Rating-Badges
   ======================================== */
.rating-master { color: #e74c3c; font-weight: 700; }
.rating-expert { color: #f39c12; font-weight: 600; }
.rating-intermediate { color: #3498db; }
.rating-beginner { color: var(--text-secondary); }

/* ========================================
   Avatar
   ======================================== */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 120px; height: 120px; }

/* ========================================
   Tabs
   ======================================== */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.7rem 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ========================================
   Utility-Klassen
   ======================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

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

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

/* ========================================
   Landing Page
   ======================================== */
.landing {
    max-width: 1000px;
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 4rem 0;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3rem;
    color: var(--accent);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 0 0 auto;
}

.chess-piece-display {
    font-size: 8rem;
    line-height: 1;
    opacity: 0.15;
    color: var(--accent);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 3rem 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Landing Stats Counter */
.landing-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2.5rem 0;
    margin: 1rem 0 2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.landing-stat { text-align: center; }

.landing-stat-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
}

.landing-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* Landing About Section */
.landing-about {
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.landing-about h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.landing-about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.landing-about-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.landing-about-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.landing-about-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Landing FAQ */
.landing-faq h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-primary);
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item[open] {
    border-color: var(--accent);
}
.faq-question {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.2s;
    line-height: 1;
}
.faq-item[open] .faq-question::after {
    content: "−";
}
.faq-question:hover {
    background: var(--bg-hover);
}
.faq-answer {
    padding: 0 1.25rem 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Landing CTA */
.landing-cta {
    text-align: center;
    padding: 3rem 0 2rem;
}

.landing-cta h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.landing-cta p {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .landing-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    .landing-stat-value { font-size: 1.6rem; }
    .landing-about-grid { grid-template-columns: 1fr; }
}

/* AI Thinking Spinner */
.ai-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 0.3rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   AI Setup Page
   ======================================== */
.ai-setup-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.ai-level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .ai-level-grid { grid-template-columns: repeat(2, 1fr); }
}

.ai-level-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.2rem 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.ai-level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow);
}

.ai-level-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 6px 20px var(--shadow);
}

.ai-level-card.tier-bronze { border-left: 4px solid var(--tier-bronze); }
.ai-level-card.tier-silver { border-left: 4px solid var(--tier-silver); }
.ai-level-card.tier-gold { border-left: 4px solid var(--tier-gold); }
.ai-level-card.tier-diamond { border-left: 4px solid var(--tier-diamond); }

.ai-level-card.selected.tier-bronze { border-color: var(--tier-bronze); box-shadow: 0 0 0 2px var(--tier-bronze); }
.ai-level-card.selected.tier-silver { border-color: var(--tier-silver); box-shadow: 0 0 0 2px var(--tier-silver); }
.ai-level-card.selected.tier-gold { border-color: var(--tier-gold); box-shadow: 0 0 0 2px var(--tier-gold); }
.ai-level-card.selected.tier-diamond { border-color: var(--tier-diamond); box-shadow: 0 0 0 2px var(--tier-diamond); }

.ai-level-icon { font-size: 2rem; }
.ai-level-name { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--text-primary); }
.ai-level-elo { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.ai-level-num { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Color Selection */
.ai-color-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.ai-color-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.ai-color-btn {
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 100px;
}

.ai-color-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.ai-color-piece { font-size: 2.5rem; }

/* AI Avatar in player box */
.ai-avatar {
    font-size: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Blog
   ======================================== */
.blog-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card {
    display: block;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.blog-card-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.blog-card-read {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* Single Article */
.blog-article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-article-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.3;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.blog-article-summary {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.blog-article-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Blog Author Signature */
.blog-article-author {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.author-signature {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.author-signature .author-label {
    opacity: 0.8;
}
.author-signature .author-name {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}
.author-signature .author-name:hover { color: var(--accent); }
.author-signature .author-sep { opacity: 0.5; }
.author-signature .author-about {
    color: var(--text-secondary);
    text-decoration: none;
}
.author-signature .author-about:hover {
    color: var(--accent);
    text-decoration: underline;
}

.blog-article-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--accent);
}

.blog-article-content p {
    margin-bottom: 1rem;
}

.blog-article-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.blog-article-content li {
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.blog-article-content strong {
    color: var(--text-primary);
}

/* ========================================
   Profil
   ======================================== */
.profile-page {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    padding: 2rem;
}

.profile-avatar-section {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    border: 2px solid var(--bg-card);
    transition: background 0.2s;
}

.avatar-upload-btn:hover {
    background: var(--accent-hover);
}

.profile-info h1 {
    font-size: 1.6rem;
    margin-bottom: 0;
}

.profile-bio {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.profile-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

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

.highlight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.highlight-row:last-child {
    border-bottom: none;
}

.highlight-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.highlight-value {
    font-weight: 600;
}

/* Form Row (zwei Felder nebeneinander) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Figurenset-Auswahl */
.piece-style-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.piece-style-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.piece-style-option:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.piece-style-option.selected,
.piece-style-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(201, 168, 76, 0.08);
}

.piece-style-option input[type="radio"] {
    display: none;
}

.piece-preview {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.piece-preview-img {
    width: 36px;
    height: 36px;
}

.piece-style-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.piece-style-info strong {
    font-size: 0.9rem;
}

.piece-style-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ========================================
   Einladungen
   ======================================== */
.invite-page {
    max-width: 900px;
    margin: 0 auto;
}

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

.color-choice {
    display: flex;
    gap: 0.75rem;
}

.color-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.color-option input[type="radio"] {
    display: none;
}

.color-label {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.color-option input:checked + .color-label {
    border-color: var(--accent);
    background: rgba(201, 168, 76, 0.1);
    color: var(--accent);
}

.color-white-piece { color: var(--text-primary); }
.color-black-piece { color: var(--text-muted); }

.invite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.invite-item:last-child {
    border-bottom: none;
}

.invite-item-info {
    flex: 1;
}

.invite-item-msg {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0.25rem 0;
}

.invite-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.invite-status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* ========================================
   Dashboard
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stats-card {
    grid-column: 1 / -1;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.game-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    transition: background 0.2s;
}

.game-row:last-child {
    border-bottom: none;
}

.game-row:hover {
    background: var(--bg-hover);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin: 0 -0.5rem;
    border-radius: var(--radius-sm);
}

.game-row.my-turn {
    border-left: 3px solid var(--accent);
    padding-left: 0.75rem;
}

.game-opponent {
    font-weight: 500;
}

.game-meta {
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.turn-badge {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.invite-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.invite-row:last-child {
    border-bottom: none;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-icon {
    font-size: 3rem;
    opacity: 0.2;
    margin-bottom: 0.75rem;
}

.empty-state p {
    margin-bottom: 0.25rem;
}

/* Freundesliste */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.friend-card {
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
}

.friend-header {
    position: relative;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.online-dot.online { background: var(--success); }
.online-dot.offline { background: var(--text-muted); }

.friend-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.friend-name:hover { color: var(--accent); }

.friend-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.leaderboard-row .rank {
    font-weight: 600;
    color: var(--accent);
    min-width: 2rem;
}

/* ========================================
   Meine Spiele - Spielkarten
   ======================================== */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: all 0.2s;
}

.game-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.game-card.my-turn {
    border-left: 3px solid var(--accent);
}

.game-card-info {
    flex: 1;
}

.game-card-opponent {
    font-weight: 600;
    font-size: 1rem;
}

.game-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.game-card-status {
    flex-shrink: 0;
}

.game-card-color {
    font-size: 1.3rem;
    opacity: 0.5;
}

/* ========================================
   Rangliste
   ======================================== */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leaderboard-highlight td {
    background: rgba(201, 168, 76, 0.08);
}

.leaderboard-rank {
    font-weight: 700;
    color: var(--text-muted);
}

.leaderboard-rank.top-1 { color: #ffd700; font-size: 1.1rem; }
.leaderboard-rank.top-2 { color: #c0c0c0; }
.leaderboard-rank.top-3 { color: #cd7f32; }

.leaderboard-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.leaderboard-player:hover {
    color: var(--accent);
}

/* ========================================
   Benachrichtigungen
   ======================================== */
.notifications-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    transition: background 0.2s;
}

.notification-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.notification-item:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.notification-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-item.unread {
    background: rgba(201, 168, 76, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-delete {
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    color: var(--danger);
}

/* ========================================
   Replay-Steuerung
   ======================================== */
.replay-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.replay-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.replay-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-hover);
}

/* ========================================
   Admin
   ======================================== */
.admin-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
}

.admin-nav-item {
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s;
}

.admin-nav-item:hover {
    color: var(--text-primary);
}

.admin-nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent);
}

.admin-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.admin-stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-ok {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.status-pending {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
}

.status-banned,
.status-open {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.status-resolved,
.status-reviewed {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
}

.admin-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.banned-row {
    opacity: 0.6;
}

/* Reports */
.report-card {
    border-left: 3px solid var(--warning);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.report-users {
    display: flex;
    gap: 2rem;
}

.report-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.report-body {
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
}

.report-description {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.report-admin-note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--info);
}

.report-actions {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.mb-0 { margin-bottom: 0; }

/* ========================================
   Regeln
   ======================================== */
.rules-warning-card {
    border-left: 3px solid var(--danger);
}

.rules-warning-box {
    padding: 1.25rem;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius);
    color: var(--danger);
    line-height: 1.7;
}

.rules-content {
    margin-top: 1rem;
}

.rules-content h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin: 1.5rem 0 0.5rem;
}

.rules-content h3:first-child {
    margin-top: 0.5rem;
}

.rules-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.rules-content ul {
    list-style: none;
    padding: 0;
}

.rules-content ul li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.rules-content ul li::before {
    content: '\25B6';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
    top: 0.55rem;
}

/* Glossar */
.glossary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.glossary-item {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}

.glossary-item h3 {
    font-size: 1rem;
    color: var(--accent);
    margin: 0 0 0.4rem;
}

.glossary-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s;
}

.faq-item summary:hover {
    background: var(--bg-hover);
}

.faq-item summary::before {
    content: '\25B6';
    color: var(--accent);
    font-size: 0.7rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

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

/* Mobile/Desktop visibility helpers */
.nav-mobile-only { display: none !important; }
.nav-desktop-only { display: inline-flex; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-mobile-only { display: flex !important; }
    .nav-desktop-only { display: none !important; }

    .nav-username {
        display: none;
    }

    /* Prevent horizontal overflow everywhere */
    body { overflow-x: hidden; }
    .landing, .hero-content, .landing-about, .landing-cta { overflow: hidden; }

    .auth-card {
        padding: 1.5rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
        max-width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 0;
    }

    .hero-title {
        font-size: 1.6rem;
        word-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .hero-visual {
        display: none;
    }

    .landing-about-grid {
        grid-template-columns: 1fr;
    }

    .landing-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .landing-stat-value {
        font-size: 1.6rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat {
        flex: 1;
        min-width: 80px;
    }

    .profile-avatar-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .invite-grid {
        grid-template-columns: 1fr;
    }

    .color-choice {
        flex-direction: column;
    }

    .sort-controls {
        margin-top: 0.5rem;
    }

    .game-card {
        padding: 0.75rem;
    }

    .game-card-color {
        display: none;
    }

    .notification-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .report-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .report-users {
        flex-direction: column;
        gap: 0.5rem;
    }
}
