/* =============================================================================
   WIZARD RANGLISTE 2026 - ENHANCED CONTRAST THEME
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    /* Wizard Original-Farben - VERSTÄRKT */
    --wizard-green: #1a6b4f;
    --wizard-gold: #b8860b;
    --wizard-blue: #2d6a7a;
    --wizard-red: #a23b2a;

    /* Background - MEHR KONTRAST */
    --bg-primary: #f5f3ed;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-dark: #1a1a2e;
    --bg-stone: linear-gradient(135deg, #2d3a42 0%, #1e2a32 50%, #141c22 100%);

    /* Text - VERSTÄRKT */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6a6a6a;
    --text-light: #ffffff;

    /* Accent */
    --accent: #b8860b;
    --accent-dark: #8b6508;
    --accent-light: #daa520;

    /* Borders - STÄRKER */
    --border: #d0d0d0;
    --border-dark: #b0b0b0;

    /* Shadows - STÄRKER */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-gold: 0 4px 24px rgba(184, 134, 11, 0.35);

    /* Status */
    --success: #1a6b4f;
    --error: #a23b2a;
}

html { font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 500;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h3 { font-size: 1rem; font-weight: 600; }

a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

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

/* =============================================================================
   LOGIN PAGE
   ============================================================================= */

.login-page {
    min-height: 100vh;
    background: var(--bg-stone);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: linear-gradient(to top, rgba(162, 59, 42, 0.35), transparent);
    pointer-events: none;
}

.login-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(184, 134, 11, 0.25);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.wizard-logo-img {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin-bottom: 4px;
}

.login-logo .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 0.15em;
}

/* Wizard Symbole */
.wizard-symbols {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.wizard-symbol {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    font-family: serif;
    transition: all 0.3s ease;
    cursor: default;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.wizard-symbol:hover {
    transform: scale(1.25) rotate(8deg);
}

.wizard-symbol.green { color: var(--wizard-green); }
.wizard-symbol.gold { color: var(--wizard-gold); }
.wizard-symbol.blue { color: var(--wizard-blue); }
.wizard-symbol.red { color: var(--wizard-red); }

/* Password */
.password-section {
    margin-bottom: 28px;
}

.password-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.password-section label svg {
    width: 18px;
    height: 18px;
}

.password-input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
}

.password-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(162, 59, 42, 0.12);
    border: 2px solid rgba(162, 59, 42, 0.4);
    color: var(--error);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 600;
}

.error-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-prompt {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

/* Player Grid */
.player-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.player-btn {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.player-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.player-btn:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.player-btn:active { transform: translateY(-3px); }

/* Player Avatar */
.player-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.player-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: serif;
    box-shadow: var(--shadow-sm);
}

.player-btn span {
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
}

/* =============================================================================
   HEADER
   ============================================================================= */

.header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left span {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.current-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    box-shadow: var(--shadow-sm);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.logout-btn:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(162, 59, 42, 0.08);
}

.logout-btn svg { width: 16px; height: 16px; }

/* =============================================================================
   NAVIGATION
   ============================================================================= */

.nav {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav-content {
    display: flex;
    gap: 4px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 16px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
    border-bottom: 4px solid transparent;
    margin-bottom: -2px;
}

.nav-btn svg { width: 20px; height: 20px; }

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

.nav-btn.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
    font-weight: 700;
}

/* =============================================================================
   MAIN CONTENT
   ============================================================================= */

.main {
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border);
}

.card-header svg {
    width: 26px;
    height: 26px;
    color: var(--accent);
}

/* =============================================================================
   DASHBOARD
   ============================================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* Karten dürfen unter ihre Inhaltsbreite schrumpfen (kein horizontaler Überlauf) */
.dashboard-grid > * { min-width: 0; }

/* Ranking */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--bg-primary);
    border-radius: 14px;
    border-left: 5px solid;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.ranking-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
}

/* seitliches Verschieben nur auf echten Hover-Geräten (auf Touch klebt der Hover) */
@media (hover: hover) {
    .ranking-item:hover { transform: translateX(6px); }
}

.ranking-position {
    font-size: 1.6rem;
    width: 48px;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-weight: 800;
}

.ranking-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.ranking-info { flex: 1; min-width: 0; }

.ranking-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.ranking-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}

.ranking-score {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-dark);
}

/* Side Cards */
.side-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.new-game-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    padding: 20px 28px;
    border-radius: 14px;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-gold);
    letter-spacing: 0.02em;
}

.new-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(184, 134, 11, 0.45);
    color: white;
}

.new-game-btn svg { width: 22px; height: 22px; }

/* Mini Cards */
.mini-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.mini-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.mini-card h3 svg { width: 18px; height: 18px; }

.mini-card .subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 600;
}

.mini-card .big-number {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-dark);
}

.month-winner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.month-winner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    box-shadow: var(--shadow-sm);
}

/* Niklas' Eis-Konto (ersetzt den alten Niklas-Button) */
.icecream-card {
    background: linear-gradient(135deg, rgba(244, 166, 192, 0.14), rgba(143, 216, 160, 0.12));
    border: 2px solid rgba(184, 134, 11, 0.25);
    border-radius: 14px;
    padding: 22px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.icecream-card.is-full {
    border-color: rgba(210, 59, 59, 0.45);
    background: linear-gradient(135deg, rgba(244, 166, 192, 0.25), rgba(255, 215, 0, 0.12));
    animation: ice-glow 2s ease-in-out infinite;
}

@keyframes ice-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(210, 59, 59, 0); }
    50% { box-shadow: 0 0 26px rgba(210, 59, 59, 0.35); }
}

.icecream-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 4px;
}

.icecream-card .ice-emoji { font-size: 1.2rem; }

.icecream-card .subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 600;
}

.cone-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.cone-svg {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.scoop-new {
    transform-origin: center;
    animation: scoop-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scoop-pop {
    0% { transform: scale(0) translateY(-12px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.scoop-dots { display: flex; gap: 8px; }

.scoop-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border-dark);
    background: transparent;
    transition: all 0.3s ease;
}

.scoop-dots .dot.filled {
    background: var(--accent);
    border-color: var(--accent);
}

.ice-status { min-height: 32px; margin-bottom: 8px; }

.ice-owed {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    color: var(--error);
    font-size: 1rem;
    margin-bottom: 10px;
}

.ice-extra {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
}

.ice-progress {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.redeem-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: #fff;
    padding: 11px 24px;
    border-radius: 10px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-gold);
}

.redeem-btn:hover { transform: scale(1.05); }
.redeem-btn svg { width: 18px; height: 18px; }

.ice-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* =============================================================================
   GAME ENTRY (Rundeneingabe)
   ============================================================================= */

.game-container {
    max-width: 680px;
    margin: 0 auto;
}

.game-header {
    text-align: center;
    margin-bottom: 32px;
}

.game-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.game-header h2 svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.game-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
    font-weight: 600;
}

/* Geber-Info + Runden-Navigation */
.round-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.starter-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(184, 134, 11, 0.1);
    border: 2px solid rgba(184, 134, 11, 0.25);
    border-radius: 10px;
    color: var(--accent-dark);
    font-size: 0.9rem;
}

.starter-info-badge svg { width: 18px; height: 18px; }
.starter-info-badge strong { font-weight: 700; }

.round-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.round-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.round-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.round-nav-btn svg { width: 16px; height: 16px; }

.edit-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(45, 106, 122, 0.12);
    border: 2px solid rgba(45, 106, 122, 0.3);
    border-radius: 10px;
    color: var(--wizard-blue);
    font-size: 0.85rem;
    font-weight: 600;
}

.edit-banner svg { width: 16px; height: 16px; }

/* Score Board */
.score-board {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.score-board h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    font-weight: 700;
}

.score-board h3 svg { width: 16px; height: 16px; }

/* Fluid: passt sich an Spieleranzahl UND Bildschirmbreite an */
.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 12px;
}

.score-item {
    text-align: center;
    padding: 14px 10px;
    background: var(--bg-primary);
    border-radius: 12px;
    border-top: 4px solid;
}

.score-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid;
    margin-bottom: 6px;
}

.score-item .name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.score-item .value {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-dark);
}

/* Entry Table */
.entry-table {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.entry-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.entry-header > div:first-child { text-align: left; }

.entry-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 2px solid var(--border);
    align-items: center;
    border-left: 5px solid;
}

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

.entry-player {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.entry-player-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.entry-input {
    width: 100%;
    max-width: 75px;
    padding: 12px 10px;
    border-radius: 12px;
    border: 3px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-align: center;
    margin: 0 auto;
    display: block;
    transition: all 0.2s ease;
}

.entry-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
}

.score-preview {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1.2rem;
    text-align: center;
}

.score-preview.positive { color: var(--success); }
.score-preview.negative { color: var(--error); }

/* Validation */
.validation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    margin-bottom: 18px;
    font-weight: 700;
}

.validation svg { width: 20px; height: 20px; }

.validation.warning {
    background: rgba(162, 59, 42, 0.1);
    border: 2px solid rgba(162, 59, 42, 0.35);
    color: var(--error);
}

.validation.ok {
    background: rgba(26, 107, 79, 0.1);
    border: 2px solid rgba(26, 107, 79, 0.35);
    color: var(--success);
}

.validation-box { margin-bottom: 12px; }
.validation-box:last-of-type { margin-bottom: 20px; }

/* Buttons */
.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--success), #145a3e);
    border: none;
    color: white;
    padding: 18px 28px;
    border-radius: 14px;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(26, 107, 79, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(26, 107, 79, 0.45);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary svg { width: 22px; height: 22px; }

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 18px;
    width: 100%;
}

.btn-secondary:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(162, 59, 42, 0.08);
}

.btn-secondary svg { width: 18px; height: 18px; }

/* =============================================================================
   NEW GAME (Spielerauswahl & Reihenfolge)
   ============================================================================= */

.newgame-wrap { max-width: 560px; margin: 0 auto; }

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 24px 0 4px;
}

.section-label:first-of-type { margin-top: 8px; }
.section-label svg { width: 18px; height: 18px; color: var(--accent); }

.hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; font-weight: 500; }

/* Spielerauswahl */
.player-select {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.select-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    opacity: 0.55;
}

.select-card.selected {
    opacity: 1;
    border-color: var(--pc);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.select-card .check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pc);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
}

.select-card.selected .check { display: flex; }
.select-card .check svg { width: 14px; height: 14px; }

.select-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    flex-shrink: 0;
}

.select-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: serif;
    background: var(--bg-primary);
}

.select-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1rem; color: var(--text-primary); }

/* Reihenfolge */
.order-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-left: 5px solid var(--pc);
    border-radius: 12px;
}

.order-pos {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pc);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.order-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    flex-shrink: 0;
}

.order-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: serif;
    background: var(--bg-card);
}

.order-name { flex: 1; font-family: 'Cinzel', serif; font-weight: 700; }

.order-controls { display: flex; gap: 6px; }

.ord-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ord-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.ord-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ord-btn svg { width: 18px; height: 18px; }

/* Gäste */
.guest-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.guest-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guest-name-input {
    display: none;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
}

.guest-card.selected .guest-name-input { display: block; }

.guest-name-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

/* Feste Rundenzahl (Standard nach Spieleranzahl) */
.rounds-fixed {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    margin-bottom: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.05rem;
}

.rounds-fixed svg { width: 20px; height: 20px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.back-link svg { width: 16px; height: 16px; }

/* =============================================================================
   GAME ROUNDS (Spielverlauf / einzelne Runden)
   ============================================================================= */

.subtitle-line { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; margin-bottom: 24px; }

.rounds-overview { display: flex; flex-direction: column; gap: 14px; }

.round-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.round-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.round-badge {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    color: var(--accent-dark);
    font-size: 1rem;
}

.edit-round-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.edit-round-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.edit-round-btn svg { width: 14px; height: 14px; }

/* Saubere 2er-Umbrüche auf dem Handy (4 Spieler = 2x2) */
.round-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.round-cell {
    background: var(--bg-primary);
    border-radius: 10px;
    border-left: 4px solid;
    padding: 10px 12px;
    text-align: center;
}

.rc-name { font-weight: 700; font-size: 0.82rem; margin-bottom: 6px; }

.rc-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.rc-call svg { width: 14px; height: 14px; color: var(--text-muted); }

.rc-score { font-family: 'Cinzel', serif; font-weight: 800; font-size: 1rem; margin-top: 4px; }
.rc-score.positive { color: var(--success); }
.rc-score.negative { color: var(--error); }

.rc-total { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; margin-top: 2px; }
.rc-empty { color: var(--text-muted); font-size: 1.2rem; }

.overview-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.overview-actions .btn-primary,
.overview-actions .btn-secondary {
    width: auto;
    flex: 1;
    min-width: 150px;
    margin-top: 0;
}

/* =============================================================================
   STATISTICS
   ============================================================================= */

.page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.page-title svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.stat-icon svg {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

/* Für Narr-Icon speziell */
.stat-icon .narr-icon {
    width: 48px;
    height: 48px;
}

.stat-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-value {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.stat-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 600;
}

/* Stat Card mit Avatar */
.stat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-sm);
}

/* Accuracy Section */
.accuracy-section { margin-bottom: 32px; }

.accuracy-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.accuracy-row:last-child { margin-bottom: 0; }

.accuracy-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.accuracy-name {
    width: 90px;
    font-size: 0.95rem;
    font-weight: 700;
}

.accuracy-bar-container {
    flex: 1;
    height: 14px;
    background: var(--bg-primary);
    border-radius: 7px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.accuracy-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.accuracy-value {
    width: 55px;
    text-align: right;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
}

/* Wins Grid */
.wins-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

@media (min-width: 640px) {
    .wins-grid { grid-template-columns: repeat(4, 1fr); }
}

.win-card {
    text-align: center;
    padding: 24px 18px;
    background: var(--bg-primary);
    border-radius: 14px;
    border-top: 5px solid;
    border: 2px solid var(--border);
    border-top-width: 5px;
    transition: all 0.2s ease;
}

.win-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.win-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid;
    margin: 0 auto 14px;
    box-shadow: var(--shadow-sm);
}

.win-name {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    margin-bottom: 8px;
}

.win-count {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-dark);
}

.win-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

/* =============================================================================
   HISTORY
   ============================================================================= */

.no-games {
    text-align: center;
    padding: 70px 24px;
    color: var(--text-secondary);
}

.no-games svg {
    width: 80px;
    height: 80px;
    color: var(--border-dark);
    margin-bottom: 24px;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.game-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.game-number {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent-dark);
    font-size: 1.1rem;
}

.game-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.game-winner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(184, 134, 11, 0.12);
    border: 2px solid rgba(184, 134, 11, 0.3);
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
}

.game-winner svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.game-winner-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    box-shadow: var(--shadow-sm);
}

.winner-score {
    margin-left: auto;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent-dark);
    font-size: 1.1rem;
}

.game-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.9rem;
    background: var(--bg-primary);
    border-radius: 10px;
    font-weight: 600;
}

.game-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-dark);
}

.game-detail-link svg { width: 15px; height: 15px; }

/* =============================================================================
   MY STATS
   ============================================================================= */

.my-stats-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.my-stats-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid;
    box-shadow: var(--shadow-md);
}

.my-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

@media (min-width: 640px) {
    .my-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

.my-stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    border-top: 5px solid;
    box-shadow: var(--shadow-sm);
}

.my-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-dark);
}

.my-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 6px;
    font-weight: 700;
}

.my-games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-game-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 2px solid var(--border);
}

.my-game-position {
    font-size: 1.4rem;
    width: 44px;
    text-align: center;
}

.my-game-score {
    flex: 1;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent-dark);
    font-size: 1.1rem;
}

.my-game-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* =============================================================================
   SETTINGS
   ============================================================================= */

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 750px;
}

@media (min-width: 640px) {
    .settings-grid { grid-template-columns: repeat(2, 1fr); }
}

.player-settings-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    border-top: 6px solid;
    box-shadow: var(--shadow-sm);
}

.settings-avatar-section { margin-bottom: 20px; }

.settings-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.settings-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: serif;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-md);
}

.avatar-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.avatar-upload-label:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: rgba(184, 134, 11, 0.08);
}

.avatar-upload-label svg { width: 18px; height: 18px; }

.avatar-upload-input { display: none; }

.form-group { margin-top: 20px; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 3px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    padding: 16px 40px;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 28px;
    box-shadow: var(--shadow-gold);
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(184, 134, 11, 0.45);
}

.btn-save svg { width: 20px; height: 20px; }

/* =============================================================================
   GAME RESULT
   ============================================================================= */

.result-container {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.result-header { margin-bottom: 36px; }

.result-header svg {
    width: 88px;
    height: 88px;
    color: var(--accent);
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(184, 134, 11, 0.3));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.result-ranking {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    border-left: 6px solid;
    box-shadow: var(--shadow-sm);
}

.result-item.winner {
    background: rgba(184, 134, 11, 0.1);
    border-color: rgba(184, 134, 11, 0.35);
}

.result-position {
    font-size: 1.7rem;
    width: 48px;
    text-align: center;
}

.result-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid;
    box-shadow: var(--shadow-sm);
}

.result-name {
    flex: 1;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: left;
}

.result-score {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-dark);
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.result-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.result-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: var(--shadow-gold);
}

.result-btn.secondary {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

.result-btn:hover { transform: translateY(-3px); }

.result-btn svg { width: 20px; height: 20px; }

/* =============================================================================
   FLASH MESSAGES
   ============================================================================= */

.flash-messages {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    font-weight: 700;
}

.flash svg { width: 20px; height: 20px; }

.flash.success { background: var(--success); color: white; }
.flash.info { background: var(--wizard-blue); color: white; }
.flash.error { background: var(--error); color: white; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* =============================================================================
   RESPONSIVE / MOBILE
   ============================================================================= */

/* Tablets & große Handys: Header kompakt, Navigation nur Icons, Runden-Navi gestapelt */
@media (max-width: 560px) {
    /* Header */
    .header { padding: 12px 14px; }
    .header-left span { font-size: 1rem; }
    .header-right { gap: 8px; }
    .current-user { font-size: 0.9rem; gap: 6px; }
    .current-user-avatar { width: 32px; height: 32px; }
    .logout-btn { padding: 8px 10px; }
    .logout-btn span { display: none; }

    /* Navigation: nur Icons, gleichmäßig verteilt (alle Punkte passen) */
    .nav { padding: 0 6px; }
    .nav-content { justify-content: space-around; gap: 0; width: 100%; }
    .nav-btn { padding: 14px 8px; }
    .nav-btn span { display: none; }
    .nav-btn svg { width: 22px; height: 22px; }

    /* Rundeneingabe: Geber-Badge + Navigation stapeln */
    .round-info { flex-direction: column; align-items: stretch; }
    .starter-info-badge { justify-content: center; }
    .round-nav { justify-content: space-between; }
    .round-nav-btn { flex: 1; justify-content: center; }
}

/* Kleine Handys */
@media (max-width: 480px) {
    .header { padding: 12px 16px; }
    .main { padding: 24px 16px; }
    .login-container { padding: 36px 28px; }

    .wizard-symbols { gap: 18px; }
    .wizard-symbol { width: 44px; height: 44px; font-size: 1.8rem; }

    .player-grid { gap: 14px; }
    .player-btn { padding: 20px 14px; }
    .player-avatar, .player-avatar-placeholder { width: 56px; height: 56px; }

    /* Spielerauswahl im neuen Spiel einspaltig */
    .player-select { grid-template-columns: 1fr; }

    .entry-header, .entry-row {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 8px;
        padding: 14px;
    }

    .entry-player span { display: none; }
    .entry-input { max-width: 60px; padding: 10px 6px; font-size: 1.1rem; }
    .entry-player-avatar { width: 36px; height: 36px; }

    /* Gesamtrangliste kompakter, damit Name/Meta und Punktzahl nebeneinander passen */
    .card { padding: 18px; }
    .ranking-item { gap: 10px; padding: 14px 12px; }
    .ranking-position { width: 26px; font-size: 1.1rem; }
    .ranking-avatar { width: 44px; height: 44px; border-width: 3px; }
    .ranking-name {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ranking-meta {
        font-size: 0.72rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ranking-score { font-size: 1.25rem; flex-shrink: 0; }
}

/* Sehr schmale Handys: Markentext ausblenden, langer Name abgeschnitten */
@media (max-width: 380px) {
    .header-left span { display: none; }
    .current-user span:not(.current-user-avatar) {
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}