/* ========================================
   MODE SURVIE - CSS COMPLET
   ======================================== */

/* === CONTAINER === */
.survie-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 80px);
}

.survie-game-screen {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem;
    gap: 2rem;
}

/* === HEADER STATS === */
.survie-header {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.survie-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* === HEARTS (LIVES) === */
.lives-display {
    position: relative;
}

.hearts-container {
    display: flex;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.heart {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.heart.full {
    opacity: 1;
    transform: scale(1);
}

.heart.lost {
    opacity: 0.3;
    filter: grayscale(100%);
    transform: scale(0.8);
}

/* === MULTIPLIER === */
.multiplier-display {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.multiplier-display.active {
    opacity: 1;
}

.multiplier-value {
    color: var(--accent-primary);
    animation: pulse 0.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === FORMAT INDICATOR === */
.format-indicator {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.format-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--accent-primary);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.format-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* === CONTENT AREA === */
.content-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 400px;
}

.content-display {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Map Display */
.content-display svg {
    width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Silhouette Display */
.silhouette-container-survie {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.silhouette-container-survie svg {
    max-width: 100%;
    max-height: 500px;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

/* Flag Display */
.flag-display-survie {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.flag-display-survie img {
    max-width: 640px;
    max-height: 480px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* === INPUT SECTION === */
.input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
}

.input-wrapper {
    width: 100%;
    max-width: 600px;
}

.country-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.country-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.country-input::placeholder {
    color: var(--text-secondary);
}

/* === FEEDBACK MESSAGE === */
.feedback-message {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 3rem;
}

.feedback-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    opacity: 1;
}

.feedback-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    opacity: 1;
}

/* === END MODAL === */
.end-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.end-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* === SCORE SHOWCASE === */
.score-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.score-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.3));
}

.score-number {
    font-family: 'Space Mono', monospace;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.stat-number {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === FORMAT BREAKDOWN === */
.format-breakdown {
    margin-bottom: 2rem;
}

.breakdown-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.format-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.format-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.format-item:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.format-emoji {
    font-size: 1.5rem;
}

.format-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.format-count {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* === ERROR INFO === */
.error-info {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.error-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 0.75rem;
}

.error-detail {
    color: var(--text-primary);
    font-size: 1rem;
}

.error-detail strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* === MODAL ACTIONS === */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn {
    flex: 1;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === ENTER HINT === */
.enter-hint {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.enter-hint kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .survie-game-screen {
        padding: 1rem 0.5rem;
        gap: 1.5rem;
    }

    .survie-header {
        padding: 1rem;
    }

    .survie-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .hearts-container {
        font-size: 1.25rem;
    }

    .format-badge {
        font-size: 0.875rem;
        padding: 0.5rem 1.5rem;
    }

    .content-area {
        padding: 1rem 0.5rem;
        min-height: 300px;
    }

    .country-input {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .score-number {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .stat-label {
        font-size: 0.75rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .format-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    animation: fadeIn 0.5s ease-out;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }

/* === CONFETTI (bonus for perfect games) === */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    animation: confettiFall linear forwards;
    pointer-events: none;
    z-index: 9999;
}

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