/* Palamecia Titling font - add woff/woff2 files to /fonts/ when available */
@font-face {
    font-family: 'Palamecia Titling';
    src: url('/fonts/palamecia_titling.woff2') format('woff2'),
         url('/fonts/palamecia_titling.woff') format('woff');
    font-display: swap;
}

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

:root {
    /* iOS Comic Design System */
    --background: #F5F0E8;
    --card-background: #FFFFFF;
    --surface: #FFFFFF;
    --primary: #FFD100;
    --primary-dark: #E6BC00;
    --secondary-orange: #F5A623;
    --text: #000000;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --border: #000000;
    --border-width: 2px;
    --border-thick: 3px;

    /* Semantic colors */
    --success: #34C759;
    --danger: #FF3B30;
    --yellow: #FFD60A;

    /* Typography */
    --font-display: 'Palamecia Titling', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Screens */
.screen {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px;
}

/* Home Screen */
#home-screen {
    justify-content: center;
    background: var(--background);
}

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

.logo-image {
    max-width: 200px;
    height: auto;
    margin-bottom: 8px;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
}

.tagline {
    color: var(--text-secondary);
    font-size: 14px;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.app-promo {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.app-store-badge {
    height: 44px;
    width: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: var(--border-thick) solid var(--border);
    border-radius: 16px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--border);
}

.btn-full {
    width: 100%;
}

.btn-text-danger {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
}

/* How to Play */
.how-to-play {
    text-align: center;
}

.section-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--text);
    border: var(--border-width) solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.step-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.back-btn:hover {
    background: var(--surface);
}

.back-btn img {
    width: 20px;
    height: 20px;
}

/* Forms */
.form-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 48px;
}

.form-emoji {
    font-size: 60px;
    display: block;
    margin-bottom: 16px;
}

.form-header h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    color: var(--text-secondary);
}

.form-group input {
    padding: 16px;
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
    background: var(--card-background);
    font-size: 16px;
    color: var(--text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.3);
}

#game-code {
    text-align: center;
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.form-illustration {
    display: block;
    margin: 0 auto 16px;
}

.error {
    color: var(--danger);
    font-size: 14px;
    text-align: center;
}

/* Lobby */
.lobby-header {
    text-align: center;
    padding-top: 24px;
    margin-bottom: 24px;
}

.lobby-header h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 12px;
}

.game-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.code {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    background: var(--primary);
    border: var(--border-width) solid var(--border);
    padding: 8px 16px;
    letter-spacing: 4px;
    color: var(--text);
    border-radius: 8px;
}

.players-section {
    flex: 1;
}

.players-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
}

.player-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--text);
    border: var(--border-width) solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 500;
}

.player-badge {
    font-size: 12px;
    color: var(--primary);
}

.you-badge {
    font-size: 12px;
    color: var(--text-secondary);
}

.host-crown {
    font-size: 16px;
}

.lobby-footer {
    text-align: center;
    padding-top: 24px;
}

.waiting-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Game Screen */
.game-tabs {
    display: flex;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: var(--primary);
    color: var(--text);
    border: var(--border-width) solid var(--border);
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tab-content.hidden {
    display: none;
}

/* Winner Banner */
.winner-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--primary);
    border: var(--border-thick) solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.trophy {
    font-size: 28px;
}

.winner-banner strong {
    display: block;
}

.winner-banner p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Missions */
.missions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.missions-header h3 {
    font-size: 16px;
}

#missions-progress {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s;
}

.missions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
}

.mission-card {
    padding: 16px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 16px;
    transition: all 0.2s;
}

.mission-card.completed {
    background: rgba(52, 199, 89, 0.1);
    border: var(--border-width) solid var(--success);
}

.mission-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mission-category {
    font-size: 12px;
    color: var(--text-secondary);
}

.difficulty-dots {
    display: flex;
    gap: 4px;
}

.difficulty-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.difficulty-dot.easy { background: var(--success); }
.difficulty-dot.medium { background: var(--primary); }
.difficulty-dot.hard { background: var(--danger); }

.mission-text {
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
}

.mission-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.completed-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success);
    font-size: 12px;
}

.complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--text);
    border: var(--border-width) solid var(--border);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.complete-btn:hover {
    background: var(--primary-dark);
}

/* Leaderboard */
.leaderboard-header {
    text-align: center;
    margin-bottom: 16px;
}

.leaderboard-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 4px;
}

.leaderboard-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
}

.leaderboard-row.winner {
    background: var(--primary);
    border: var(--border-thick) solid var(--border);
}

.rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: var(--border-width) solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.rank-1 { background: var(--primary); color: var(--text); }
.rank-2 { background: #C0C0C0; color: #000; }
.rank-3 { background: #CD7F32; color: #fff; }
.rank-other { background: var(--card-background); color: var(--text-secondary); }

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 500;
}

.leaderboard-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.leaderboard-mission {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.3;
}

.progress-dots {
    display: flex;
    gap: 4px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}

.progress-dot.filled {
    background: var(--success);
}

.game-info {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.game-info .label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.game-info .value {
    font-size: 14px;
    font-weight: 500;
}

.leave-btn {
    margin: 16px auto;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
}

.modal-content {
    background: var(--card-background);
    border: var(--border-thick) solid var(--border);
    border-radius: 20px;
    padding: 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
}

.modal-content h3 {
    font-family: var(--font-display);
}

.modal-content h3 {
    margin-bottom: 12px;
}

#modal-mission-text {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-subtext {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
}

/* Mode Badge */
.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--text);
    border: var(--border-width) solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}

/* Selection Screen (Hunter Mode) */
.selection-header {
    text-align: center;
    padding-top: 24px;
    margin-bottom: 24px;
}

.selection-header h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 8px;
}

.selection-header p {
    color: var(--text-secondary);
}

.target-card {
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.target-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.target-name-display {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--danger);
}

.mission-selection h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.mission-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mission-option {
    padding: 16px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.mission-option:hover {
    border-color: var(--primary);
    background: rgba(255, 209, 0, 0.1);
}

.mission-option.selected {
    border-color: var(--primary);
    background: var(--primary);
}

.mission-option-text {
    font-weight: 500;
    line-height: 1.4;
}

.selection-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: var(--text-secondary);
}

.selection-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.selection-player {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 8px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 8px;
}

.selection-player.ready {
    background: rgba(52, 199, 89, 0.1);
    border-color: var(--success);
    color: var(--success);
}

/* Hunter Mode Game Content */
.hunter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hunter-eliminated {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.eliminated-icon {
    font-size: 80px;
    margin-bottom: 16px;
}

.hunter-eliminated h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--danger);
}

.hunter-eliminated p {
    color: var(--text-secondary);
}

.eliminated-by {
    margin-top: 16px;
    font-size: 14px;
}

.hunter-active {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.hunter-target-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-background);
    border-radius: 16px;
    border: var(--border-thick) solid var(--danger);
}

.target-avatar {
    width: 56px;
    height: 56px;
    background: var(--danger);
    color: white;
    border: var(--border-width) solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.target-name {
    font-size: 24px;
    font-weight: 700;
}

.hunter-mission-card {
    padding: 20px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 16px;
}

.hunter-mission-card p {
    font-size: 16px;
    line-height: 1.5;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--border);
}

.btn-danger:hover {
    background: #E6352B;
}

.hunter-players-section {
    margin-top: auto;
    padding-top: 16px;
}

.hunter-players-section h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hunter-players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hunter-player-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 20px;
    font-size: 14px;
}

.hunter-player-chip.eliminated {
    opacity: 0.5;
    text-decoration: line-through;
}

.hunter-player-chip.you {
    border: 1px solid var(--primary);
}

.hunter-player-chip .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.hunter-player-chip.eliminated .status-dot {
    background: var(--danger);
}

/* Modal updates for Hunter */
.modal-mission-text {
    font-style: italic;
    color: var(--text-secondary);
    margin: 8px 0;
}

/* Hunter Mission Selection - Additional Styles */
.mission-option-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.selected-mission-display {
    background: var(--primary);
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.selected-mission-display h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.selected-mission-text {
    font-weight: 500;
}

.waiting-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: var(--text-secondary);
}

.status-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--card-background);
    border: var(--border-width) solid var(--border);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
}

.status-icon {
    color: var(--text-secondary);
}

.status-icon.done {
    color: var(--success);
}

.confirm-selection-btn {
    margin-top: 16px;
}

/* Hunter Mode Game - Additional Styles */
.eliminated-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.eliminated-state .eliminated-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.eliminated-state h3 {
    color: var(--danger);
    margin-bottom: 8px;
}

.eliminated-state p {
    color: var(--text-secondary);
}

.eliminated-hint {
    margin-top: 16px;
    font-size: 12px;
}

.eliminated-state + .target-card,
.hunter-active .target-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card-background);
    border: var(--border-thick) solid var(--danger);
    border-radius: 12px;
}

.target-icon {
    font-size: 32px;
}

.target-info {
    flex: 1;
}

.target-info .target-name {
    font-size: 20px;
    font-weight: 700;
}

.target-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.eliminate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: var(--danger);
    color: white;
    border: var(--border-thick) solid var(--border);
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

.eliminate-btn:hover {
    background: #E6352B;
}

/* Hunter Leaderboard Styles */
.hunter-section {
    margin-bottom: 20px;
}

.hunter-section .section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.leaderboard-row.eliminated {
    opacity: 0.6;
}

.leaderboard-row.eliminated .player-avatar {
    background: rgba(128, 128, 128, 0.2);
    color: var(--text-secondary);
}

.alive-dot {
    color: var(--success);
    font-size: 10px;
}

.eliminated-x {
    font-size: 16px;
}

.winner-crown {
    font-size: 20px;
}

/* Target Player Selection */
.target-selection-modal {
    max-width: 360px;
}

.target-player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
    max-height: 300px;
    overflow-y: auto;
}

.target-player-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--background);
    border: var(--border-width) solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: left;
    width: 100%;
}

.target-player-btn:hover {
    background: var(--primary);
}

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

.target-player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: var(--border-width) solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 16px;
}

.target-player-name {
    flex: 1;
    font-family: var(--font-display);
    font-size: 16px;
}

.target-player-chevron {
    color: var(--text-secondary);
    font-size: 14px;
}

.target-selection-modal .cancel-btn {
    width: 100%;
    margin-top: 8px;
}

/* Winner Overlay */
.winner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease-out;
}

.winner-overlay-content {
    text-align: center;
    padding: 32px 24px;
    max-width: 320px;
    width: 100%;
    z-index: 1;
}

.winner-trophy {
    font-size: 96px;
    animation: trophyBounce 0.6s ease-out;
    margin-bottom: 16px;
}

.winner-overlay-content h2 {
    font-family: var(--font-display);
    font-size: 32px;
    color: white;
    margin-bottom: 8px;
}

.winner-overlay-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 32px;
}

.winner-overlay-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

@keyframes trophyBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Confetti */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 20px;
    top: -20px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
