:root {
    --bg-dark: #0f172a;
    --code-bg: #1e293b;
    --text-primary: #e2e8f0;
    --accent-green: #10b981;
    --accent-gold: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --glass: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary);
    background: #000;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 🎅 LE DÉCOR ENCHANTÉ (Fond & Ambiance) 🎅 */
body {
    background: url('joyeux_noel_2025.jpg') no-repeat center center fixed;
    background-size: cover;
    /* On assure que le fond noir ne cache pas l'image */
    background-color: #0f172a;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Un léger dégradé pour rendre le texte lisible par dessus l'image */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
}

/* 📱 CONTENEUR PRINCIPAL */
#app {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

/* 👨‍💻 L'ATELIER DE CODE (Fenêtre Editor) */
.code-container {
    width: 100%;
    background: rgba(30, 41, 59, 0.95);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.code-container.deployed {
    transform: scale(0) rotateX(90deg);
    opacity: 0;
}

.window-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
}

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

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.filename {
    margin-left: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #94a3b8;
}

.code-content {
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    height: 300px;
    overflow-y: auto;
}

#typewriter {
    white-space: pre-wrap;
    color: #a5b4fc;
}

.keyword {
    color: #c084fc;
}

/* purple */
.string {
    color: #86efac;
}

/* green */
.func {
    color: #60a5fa;
}

/* blue */
.comment {
    color: #64748b;
    font-style: italic;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent-green);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.action-bar {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.deploy-btn {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    border: none;
    padding: 12px 24px;
    color: white;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    opacity: 0.5;
    pointer-events: none;
}

.deploy-btn.ready {
    opacity: 1;
    pointer-events: auto;
}

.deploy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

/* === SCENE 2: GREETING CARD === */
.card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease 1s;
}

.card-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 700px;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.christmas-title {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    margin: 0 0 20px 0;
    background: linear-gradient(to right, #fbbf24, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.greeting-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.signature {
    font-weight: 700;
    color: var(--accent-green);
    display: block;
    margin-top: 20px;
    font-size: 1.2rem;
}

/* === FOOTER === */
footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    z-index: 5;
    width: 100%;
}

.sub-footer {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* === PARTICLES CSS (Handled by JS mostly) === */
.particle {
    position: absolute;
    pointer-events: none;
}

@keyframes snowFall {
    to {
        transform: translateY(110vh) translateX(var(--wind, 0));
        opacity: 0;
    }
}

@keyframes emberRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-50vh) scale(0.8);
        opacity: 0.4;
    }

    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

@keyframes fall {

    /* (Ancienne animation, peut être gardée pour l'explosion) */
    to {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}