:root {
    --bg: #0d1f17;
    --bg-card: #152e23;
    --bg-card-hover: #1c3a2d;
    --gold: #e6b800;
    --gold-dim: #997a00;
    --pitch-green: #1a472a;
    --pitch-line: #2d7a4a;
    --white: #f0f0f5;
    --text-secondary: #a8c4b8;
    --text-muted: #5a8a72;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
}

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

html, body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--white);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    #app {
        max-width: 480px;
    }
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    padding: 16px 0 40px;
}

.screen.active {
    display: flex;
}

/* Landing Screen */
.landing-logo {
    margin-top: 5px;
    text-align: center;
}

.logo-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
}

.landing-logo h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.landing-logo .gold {
    color: var(--gold);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 8px;
}

.formation-picker {
    margin-top: 24px;
    width: 100%;
    max-width: 420px;
}

.picker-label {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.formation-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.formation-group-label {
    grid-column: 1 / -1;
    font-size: 0;
    height: 6px;
    margin: 0;
    padding: 0;
}

.formation-group-label:first-child {
    height: 0;
}

.formation-btn {
    background: var(--bg-card);
    border: 2px solid transparent;
    color: var(--white);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.formation-btn:hover {
    background: var(--bg-card-hover);
}

.formation-btn.active {
    border-color: var(--gold);
    background: var(--bg-card-hover);
}

.btn-start {
    margin-top: 20px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 16px 64px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-start:hover {
    transform: scale(1.03);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.3);
}

.btn-start:active {
    transform: scale(0.98);
}

.btn-spin {
    margin-top: 20px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 14px 48px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-spin:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(230, 184, 0, 0.3);
}

.btn-spin:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-spin:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Landing Links */
.landing-links {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.link-btn {
    background: var(--bg-card);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    position: relative;
}

.link-btn:hover {
    background: var(--bg-card-hover);
    transform: scale(1.1);
}

.link-btn:hover::after {
    content: attr(data-label);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: var(--font);
}

/* Top Players Screen */
.top-players-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 0;
}

.top-players-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.top-players-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 75vh;
    padding-bottom: 24px;
}

.tp-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.tp-rank {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.tp-entry:nth-child(1) .tp-rank { color: var(--gold); }
.tp-entry:nth-child(2) .tp-rank { color: #c0c0c0; }
.tp-entry:nth-child(3) .tp-rank { color: #cd7f32; }

.tp-info {
    flex: 1;
}

.tp-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.tp-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.tp-rating {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
}

/* Draft Screen */
.draft-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.topbar-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: var(--bg-card);
    border: 2px solid var(--bg-card-hover);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.icon-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

.icon-btn:active {
    transform: scale(0.95);
}

/* Draft two-panel layout */
.draft-layout {
    width: 100%;
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

.draft-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.draft-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.draft-pitch {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 70vh;
    background: var(--pitch-green);
    border-radius: var(--radius);
    position: relative;
    border: 2px solid var(--pitch-line);
    overflow: hidden;
}

@media (max-width: 768px) {
    .draft-layout {
        flex-direction: column;
    }

    .draft-right {
        display: none;
    }
}

.draft-respins {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding-bottom: 8px;
}

.round-indicator {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.round-indicator span {
    color: var(--gold);
    font-size: 1rem;
}

.respins {
    display: flex;
    gap: 8px;
}

.respin-btn {
    background: var(--bg-card);
    border: 1px solid var(--text-muted);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s, border-color 0.2s;
}

.respin-btn:hover {
    border-color: var(--gold);
}

.respin-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.respin-count {
    color: var(--gold);
    font-weight: 700;
}


.ad-respin-btn {
    border-color: var(--gold-dim) !important;
    background: rgba(230, 184, 0, 0.05);
}

.ad-respin-btn:hover:not(:disabled) {
    border-color: var(--gold) !important;
    background: rgba(230, 184, 0, 0.1);
}

/* Ad Overlay */
.ad-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ad-modal {
    background: var(--bg-card);
    border: 2px solid var(--gold-dim);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.ad-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    width: 60px;
    height: 60px;
    background: var(--gold);
    color: var(--bg);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ad-modal h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.ad-modal p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.ad-progress {
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ad-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gold);
    border-radius: 2px;
}

.ad-skip {
    background: var(--bg);
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    cursor: not-allowed;
    transition: all 0.2s;
}

.ad-skip.ready {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
    cursor: pointer;
}

/* Spin Display */
.spin-display {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    width: 100%;
}

.spin-slot {
    flex: 1 1 0;
    background: var(--bg-card);
    border: 2px solid var(--text-muted);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: border-color 0.3s;
    min-width: 0;
    overflow: hidden;
}

.spin-slot.revealed {
    border-color: var(--gold);
}

.spin-slot.spinning {
    border-color: var(--gold-dim);
    animation: pulse 0.3s infinite alternate;
}

@keyframes pulse {
    from { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.2); }
    to { box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.15); }
}

.spin-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.spin-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    min-height: 1.6em;
    line-height: 1.6em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spin-divider {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Squad Container */
.squad-container {
    width: 100%;
    margin-top: 16px;
    overflow-y: auto;
    max-height: 55vh;
    padding-bottom: 24px;
}

.pos-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    padding: 8px 0;
}

.pos-filter {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.pos-filter.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.pos-filter:not(.active):hover {
    border-color: var(--pos-color, var(--text-secondary));
    color: var(--pos-color, var(--white));
}

.squad-cards-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.squad-group {
    margin-bottom: 16px;
}

.squad-group-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding-left: 4px;
}

.squad-group-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, opacity 0.3s;
}

.player-card:hover:not(.disabled) {
    border-color: var(--gold-dim);
    background: var(--bg-card-hover);
}

.player-card:active:not(.disabled) {
    transform: scale(0.98);
}

.player-card.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.player-card.selected {
    border-color: var(--gold);
    background: rgba(230, 184, 0, 0.08);
    transform: scale(0.95);
    opacity: 0.5;
    pointer-events: none;
}

.player-card.already-picked {
    opacity: 0.25;
    text-decoration: line-through;
    pointer-events: none;
}

.player-card.confirming {
    border-color: var(--gold);
    background: rgba(230, 184, 0, 0.08);
    position: relative;
}

.player-card.confirming::after {
    content: 'Tap again to confirm';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 46, 0.85);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
}

.player-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 20px;
    text-align: center;
}

.player-pos-tag {
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 28px;
    text-align: center;
    letter-spacing: 0.05em;
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.player-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.player-rating {
    font-size: 1rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--bg);
}

.player-rating.elite {
    color: var(--gold);
    background: rgba(230, 184, 0, 0.1);
}

.player-rating.good {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
}

/* Avg Rating Bar */
.avg-bar {
    position: sticky;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--text-muted);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-top: auto;
}

.avg-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.avg-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.avg-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Result Screen */
.result-tier {
    text-align: center;
    margin-top: 32px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tier-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.tier-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tier-score {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Pitch Formation View */
.result-pitch {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 55vh;
    background: var(--pitch-green);
    border-radius: var(--radius);
    position: relative;
    margin: 24px 0;
    border: 2px solid var(--pitch-line);
    overflow: hidden;
}

.draft-pitch .pitch-markings,
.result-pitch .pitch-markings {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.draft-pitch .pitch-halfway,
.result-pitch .pitch-halfway {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--pitch-line);
}

.draft-pitch .pitch-center-circle,
.result-pitch .pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border: 1.5px solid var(--pitch-line);
    border-radius: 50%;
}

.draft-pitch .pitch-center-dot,
.result-pitch .pitch-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--pitch-line);
    border-radius: 50%;
}

.draft-pitch .pitch-box-top,
.result-pitch .pitch-box-top {
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 16%;
    border: 1.5px solid var(--pitch-line);
    border-top: none;
}

.draft-pitch .pitch-box-bottom,
.result-pitch .pitch-box-bottom {
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 16%;
    border: 1.5px solid var(--pitch-line);
    border-bottom: none;
}

.draft-pitch .pitch-six-top,
.result-pitch .pitch-six-top {
    position: absolute;
    top: 0;
    left: 37%;
    right: 37%;
    height: 7%;
    border: 1.5px solid var(--pitch-line);
    border-top: none;
}

.draft-pitch .pitch-six-bottom,
.result-pitch .pitch-six-bottom {
    position: absolute;
    bottom: 0;
    left: 37%;
    right: 37%;
    height: 7%;
    border: 1.5px solid var(--pitch-line);
    border-bottom: none;
}

.draft-pitch .pitch-goal-top,
.result-pitch .pitch-goal-top {
    position: absolute;
    top: -2px;
    left: 42%;
    right: 42%;
    height: 2%;
    border: 2px solid var(--pitch-line);
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.draft-pitch .pitch-goal-bottom,
.result-pitch .pitch-goal-bottom {
    position: absolute;
    bottom: -2px;
    left: 42%;
    right: 42%;
    height: 2%;
    border: 2px solid var(--pitch-line);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.pitch-player {
    position: absolute;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 70px;
}

.pitch-player.empty {
    opacity: 0.5;
}

.pitch-player-slot {
    width: 40px;
    height: 40px;
    border: 2px dashed var(--pitch-line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pitch-line);
    letter-spacing: 0.03em;
}

.pitch-player.filled .pitch-player-slot {
    display: none;
}

.pitch-player-shirt {
    width: 38px;
    height: 36px;
    margin: 0 auto 2px;
    position: relative;
}

.pitch-player-shirt svg {
    width: 100%;
    height: 100%;
}

.pitch-player-rating {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 3px rgba(0,0,0,0.6), 0 0 6px rgba(0,0,0,0.3);
    -webkit-text-stroke: 0.3px rgba(0,0,0,0.2);
}

.pitch-player:hover > .pitch-tooltip {
    display: block;
}

.pitch-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
    margin-bottom: 4px;
}

.pitch-player-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.best-xi-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

/* Result Actions */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding-bottom: 32px;
}

.btn-action {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-action:active {
    transform: scale(0.98);
}

.btn-share {
    background: var(--gold);
    color: var(--bg);
}

.btn-leaderboard {
    background: var(--bg-card);
    color: var(--white);
    border: 1px solid var(--text-muted);
}

.btn-play-again {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-muted);
}

/* Leaderboard */
.leaderboard-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 0;
}

.leaderboard-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.btn-back {
    background: none;
    border: none;
    color: var(--gold);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
}

.leaderboard-tabs {
    display: flex;
    gap: 4px;
    width: 100%;
    margin-bottom: 16px;
}

.lb-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.lb-tab.active {
    border-color: var(--gold);
    color: var(--white);
}

.leaderboard-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.leaderboard-entry.rank-1 { border-left: 3px solid var(--gold); }
.leaderboard-entry.rank-2 { border-left: 3px solid #c0c0c0; }
.leaderboard-entry.rank-3 { border-left: 3px solid #cd7f32; }

.lb-rank {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.rank-1 .lb-rank { color: var(--gold); }
.rank-2 .lb-rank { color: #c0c0c0; }
.rank-3 .lb-rank { color: #cd7f32; }

.lb-info { flex: 1; }

.lb-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.lb-details {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.lb-score {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
}

.leaderboard-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 0;
}

/* Suggestions Screen */
.sug-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

.sug-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 70vh;
    padding-bottom: 24px;
}

.sug-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.sug-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 36px;
}

.sug-vote-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    transition: color 0.2s;
}

.sug-vote-btn:hover {
    color: var(--gold);
}

.sug-vote-btn.voted-up {
    color: #4ade80;
}

.sug-vote-btn.voted-down {
    color: #ef4444;
}

.sug-vote-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
}

.sug-info {
    flex: 1;
}

.sug-player-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.sug-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.sug-reason {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.sug-rating-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.85rem;
}

.sug-old {
    color: var(--text-muted);
    text-decoration: line-through;
}

.sug-arrow {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.sug-new {
    color: var(--gold);
}

.sug-new.sug-down {
    color: #ef4444;
}

.sug-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 0;
}

/* How to Play */
.htp-content {
    width: 100%;
    overflow-y: auto;
    max-height: 80vh;
    padding-bottom: 32px;
}

.htp-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.htp-section {
    margin-bottom: 20px;
}

.htp-section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.htp-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.htp-section strong {
    color: var(--white);
}

.htp-section em {
    color: var(--gold);
    font-style: normal;
}

.htp-tiers {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.htp-tier {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.htp-tier-badge {
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--bg);
}

.tier-s { background: var(--gold); }
.tier-a { background: #4ade80; }
.tier-b { background: #60a5fa; }
.tier-c { background: #a78bfa; }
.tier-d { background: #f97316; }
.tier-e { background: #6b7280; }
.tier-f { background: #ef4444; }

/* Rating Suggestion Modal */
.rating-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

.rating-modal {
    background: var(--bg-card);
    border: 2px solid var(--gold-dim);
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 320px;
}

.rating-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.rating-modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

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

.rating-modal-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.rating-modal-current {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.rating-modal-value {
    font-weight: 700;
    color: var(--white);
    font-size: 1.1rem;
}

.rating-modal-input {
    margin-bottom: 16px;
}

.rating-modal-input label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.rating-slider-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.rating-adj {
    background: var(--bg);
    border: 1px solid var(--text-muted);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.rating-adj:hover {
    border-color: var(--gold);
}

.rating-modal-suggested {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 40px;
    text-align: center;
}

.rating-modal-reason {
    margin-bottom: 16px;
}

.rating-modal-reason input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--text-muted);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.rating-modal-reason input:focus {
    border-color: var(--gold);
}

.rating-modal-reason input::placeholder {
    color: var(--text-muted);
}

.rating-modal-submit {
    width: 100%;
    background: var(--gold);
    color: var(--bg);
    border: none;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.1s;
}

.rating-modal-submit:hover {
    transform: scale(1.02);
}

.rating-modal-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.player-rating {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.player-rating:active {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(230, 184, 0, 0.3);
}

.sug-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(230, 184, 0, 0.12);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    padding: 2px 5px;
    margin-left: -4px;
}

/* Confetti */
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s ease-in forwards;
}
