/**
 * FAKE OR REAL - Game Styles
 * Adapté pour le portail Zikof
 */

/* ===== BASE STYLES ===== */
body {
    background: #17151f;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fbf2dd;
}

/* ===== HEADER OVERRIDE ===== */
.main-header {
    background: #241f33 !important;
    border-bottom: 2px solid #fbf2dd;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 0 #000;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white !important;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: white !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

#user-status {
    color: white !important;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* ===== BASE GAME CONTAINER ===== */
.game-container {
    min-height: calc(100vh - var(--header-height, 70px));
    padding: var(--space-lg, 1.5rem);
}

.container {
    max-width: var(--container-xl, 1280px);
    margin: 0 auto;
    width: 100%;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== WIZARD STYLES ===== */
.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl, 2rem) 0;
}

.wizard-progress {
    margin-bottom: var(--space-3xl, 3rem);
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background: #241f33;
    border: 2px solid #fbf2dd;
    border-radius: var(--radius-full, 9999px);
    overflow: hidden;
    margin-bottom: var(--space-md, 1rem);
}

.progress-fill {
    height: 100%;
    background: #16c08a;
    transition: width 0.3s ease;
    width: 33.33%;
}

.progress-text {
    font-size: var(--text-sm, 0.875rem);
    color: #fbf2dd;
    font-weight: var(--font-semibold, 600);
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: slideInRight 0.4s ease;
}

.wizard-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-4xl, 2.25rem);
    font-weight: var(--font-bold, 700);
    text-align: center;
    margin-bottom: var(--space-md, 1rem);
    color: #fbf2dd;
}

.wizard-subtitle {
    font-size: var(--text-lg, 1.125rem);
    text-align: center;
    color: #b9b3c9;
    margin-bottom: var(--space-3xl, 3rem);
}

.wizard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 1.5rem);
}

.wizard-option {
    background: #241f33 !important;
    border: 2px solid #fbf2dd;
    border-radius: var(--radius-xl, 1rem);
    padding: var(--space-xl, 2rem);
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 4px 4px 0 #000;
}

.wizard-option:hover {
    transform: translate(-2px, -2px);
    border-color: #2b2bff;
    box-shadow: 6px 6px 0 #000;
}

.wizard-option.selected {
    border-color: #2b2bff;
    background: #2b2bff !important;
    box-shadow: 4px 4px 0 #000;
}

.wizard-option.selected .option-title,
.wizard-option.selected .option-description {
    color: #fff !important;
}

.option-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md, 1rem);
    line-height: 1;
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.option-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-bold, 700);
    color: #fbf2dd !important;
    margin-bottom: var(--space-sm, 0.5rem);
}

.option-description {
    font-size: var(--text-sm, 0.875rem);
    color: #b9b3c9 !important;
}

/* ===== GAME SCREEN ===== */
.game-content {
    max-width: 1200px;
    margin: 0 auto;
}

.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md, 1rem);
    margin-bottom: var(--space-2xl, 2.5rem);
    padding: var(--space-lg, 1.5rem);
    background: #241f33 !important;
    border: 2px solid #fbf2dd;
    border-radius: var(--radius-xl, 1rem);
    box-shadow: 4px 4px 0 #000;
}

.stat-item {
    text-align: center;
    padding: var(--space-md, 1rem);
}

.stat-item.timer-stat {
    background: #ffd23f;
    border-radius: var(--radius-lg, 0.75rem);
}

.stat-label {
    font-size: var(--text-sm, 0.875rem);
    color: #b9b3c9 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-semibold, 600);
    margin-bottom: var(--space-xs, 0.25rem);
}

.stat-value {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-3xl, 1.875rem);
    font-weight: var(--font-bold, 700);
    color: #fbf2dd !important;
}

.timer-stat .stat-label {
    color: #1a1a1a !important;
}

.timer-stat .stat-value {
    color: #1a1a1a !important;
    font-family: 'Bricolage Grotesque', monospace;
}

.question-section {
    text-align: center;
    margin-bottom: var(--space-2xl, 2.5rem);
}

.question-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-3xl, 1.875rem);
    font-weight: var(--font-bold, 700);
    color: #fbf2dd !important;
}

/* ===== GAME IMAGES ===== */
.game-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl, 2.5rem);
    margin-bottom: var(--space-2xl, 2.5rem);
}

.image-card {
    position: relative;
    background: #241f33;
    border: 2px solid #fbf2dd;
    border-radius: var(--radius-xl, 1rem);
    overflow: hidden;
    box-shadow: 4px 4px 0 #000;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.image-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 #000;
}

.image-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.image-card:hover .image-container img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg, 1.5rem);
    background: rgba(23, 21, 31, 0.85);
}

.image-label {
    color: white;
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-bold, 700);
    text-align: center;
}

.select-btn {
    width: 100%;
    padding: var(--space-lg, 1.5rem);
    background: #2b2bff;
    color: #fff;
    border: none;
    border-top: 2px solid #fbf2dd;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-lg, 1.125rem);
    font-weight: var(--font-bold, 700);
    cursor: pointer;
    transition: background 0.15s ease;
}

.select-btn:hover {
    background: #ff5da2;
    color: #1a1a1a;
}

/* Feedback animations */
.image-card.correct {
    animation: correctAnswer 0.6s ease;
    border: 5px solid #16c08a !important;
    box-shadow: 6px 6px 0 #16c08a !important;
}

.image-card.incorrect {
    animation: incorrectAnswer 0.6s ease;
    border: 5px solid #ff5da2 !important;
    box-shadow: 6px 6px 0 #ff5da2 !important;
}

@keyframes correctAnswer {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px) scale(1.05); }
}

@keyframes incorrectAnswer {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl, 2rem);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg, 0.75rem);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 48px;
    height: 48px;
    background: #ffd23f;
    border: 2px solid #000;
    border-radius: 50%;
    color: #1a1a1a;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 #000;
}

.lightbox-close:hover {
    background: #ff5da2;
    transform: rotate(90deg);
}

.lightbox-label {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-bold, 700);
    text-align: center;
}

/* ===== RESULTS SCREEN ===== */
.results-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl, 2rem);
}

.results-header {
    text-align: center;
    margin-bottom: var(--space-3xl, 3rem);
    animation: fadeInDown 0.6s ease;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md, 1rem);
    animation: bounceIn 0.8s ease;
}

.results-header h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-4xl, 2.25rem);
    font-weight: var(--font-bold, 700);
    margin-bottom: var(--space-sm, 0.5rem);
    color: #fbf2dd;
}

.results-header p {
    font-size: var(--text-lg, 1.125rem);
    color: #b9b3c9;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-3xl, 3rem);
}

.stat-card {
    background: #241f33;
    border: 2px solid #fbf2dd;
    border-radius: var(--radius-xl, 1rem);
    padding: var(--space-xl, 2rem);
    text-align: center;
    box-shadow: 4px 4px 0 #000;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    animation: slideInUp 0.6s ease;
    animation-fill-mode: backwards;
}

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

.stat-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.stat-card.primary {
    background: #2b2bff;
}

.stat-card.primary .stat-number,
.stat-card.primary .stat-label {
    color: #fff;
}

.stat-number {
    font-family: 'Bricolage Grotesque', monospace;
    font-size: var(--text-4xl, 2.25rem);
    font-weight: var(--font-bold, 700);
    color: #fbf2dd;
    margin-bottom: var(--space-xs, 0.25rem);
}

.stat-label {
    font-size: var(--text-sm, 0.875rem);
    color: #b9b3c9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-semibold, 600);
}

.results-achievements {
    margin-bottom: var(--space-2xl, 2.5rem);
}

.achievements-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    text-align: center;
    font-size: var(--text-2xl, 1.5rem);
    font-weight: var(--font-bold, 700);
    color: #fbf2dd;
    margin-bottom: var(--space-lg, 1.5rem);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md, 1rem);
    margin-bottom: var(--space-2xl, 2.5rem);
}

.achievement-card {
    background: #241f33;
    border: 2px solid #fbf2dd;
    border-radius: var(--radius-lg, 0.75rem);
    padding: var(--space-lg, 1.5rem);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 4px 4px 0 #000;
    animation: bounceIn 0.8s ease;
    animation-fill-mode: backwards;
}

.achievement-card:nth-child(1) { animation-delay: 0.5s; }
.achievement-card:nth-child(2) { animation-delay: 0.6s; }
.achievement-card:nth-child(3) { animation-delay: 0.7s; }
.achievement-card:nth-child(4) { animation-delay: 0.8s; }

.achievement-card.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.achievement-card:not(.locked):hover {
    transform: translate(-2px, -2px) rotate(-2deg);
    box-shadow: 6px 6px 0 #000;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm, 0.5rem);
    display: block;
}

.achievement-name {
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-semibold, 600);
    color: #fbf2dd;
    margin-bottom: var(--space-xs, 0.25rem);
}

.achievement-description {
    font-size: var(--text-xs, 0.75rem);
    color: #b9b3c9;
}

.auth-cta {
    background: #2d2740;
    border: 2px solid #fbf2dd;
    box-shadow: 4px 4px 0 #000;
    border-radius: var(--radius-xl, 1rem);
    padding: var(--space-xl, 2rem);
    text-align: center;
    margin-bottom: var(--space-2xl, 2.5rem);
    animation: fadeIn 1s ease;
}

.auth-cta-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md, 1rem);
}

.auth-cta-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-bold, 700);
    color: #fbf2dd;
    margin-bottom: var(--space-sm, 0.5rem);
}

.auth-cta-text {
    font-size: var(--text-base, 1rem);
    color: #b9b3c9;
    margin-bottom: var(--space-lg, 1.5rem);
    line-height: 1.6;
}

.auth-cta-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md, 1rem);
    justify-content: center;
    margin-bottom: var(--space-lg, 1.5rem);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
    color: white;
    font-size: var(--text-sm, 0.875rem);
}

.auth-cta-actions {
    display: flex;
    gap: var(--space-md, 1rem);
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md, 1rem);
    flex-wrap: wrap;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

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

/* ===== CONFETTI ===== */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 0;
    z-index: 9999;
    pointer-events: none;
    animation: confettiFall 3s ease-in forwards;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl, 2rem);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #241f33;
    border: 2px solid #fbf2dd;
    box-shadow: 6px 6px 0 #000;
    color: #fbf2dd;
    border-radius: var(--radius-xl, 1rem);
    padding: var(--space-2xl, 2.5rem);
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: slideInDown 0.4s ease;
}

.modal-content h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    color: #fbf2dd;
}

.modal-close {
    position: absolute;
    top: var(--space-lg, 1.5rem);
    right: var(--space-lg, 1.5rem);
    width: 40px;
    height: 40px;
    background: #ffd23f;
    color: #1a1a1a;
    border: 2px solid #000;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 #000;
}

.modal-close:hover {
    background: #ff5da2;
    transform: rotate(90deg);
}

.help-content {
    margin-top: var(--space-xl, 2rem);
}

.help-section {
    margin-bottom: var(--space-xl, 2rem);
}

.help-section h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-bold, 700);
    margin-bottom: var(--space-md, 1rem);
    color: #fbf2dd;
}

.help-section p {
    color: #b9b3c9;
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wizard-options {
        grid-template-columns: 1fr;
    }

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

    .game-images {
        grid-template-columns: 1fr;
    }

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

    .wizard-title {
        font-size: var(--text-2xl, 1.5rem);
    }

    .question-title {
        font-size: var(--text-xl, 1.25rem);
    }

    .results-header h2 {
        font-size: var(--text-3xl, 1.875rem);
    }

    .stat-card {
        padding: var(--space-lg, 1.5rem);
    }

    .stat-number {
        font-size: var(--text-3xl, 1.875rem);
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-cta {
        padding: var(--space-lg, 1.5rem);
    }

    .auth-cta-benefits {
        flex-direction: column;
        align-items: center;
    }

    .auth-cta-actions {
        flex-direction: column;
    }

    .auth-cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .results-stats {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: var(--text-2xl, 1.5rem);
    }

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

    .achievement-icon {
        font-size: 2rem;
    }
}

/* ===== HEADER BUTTONS ===== */
.btn-icon {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}
