/* ============================================
   🎄 SECRET SANTA - STYLES FESTIFS
   ============================================ */

:root {
    /* Couleurs principales */
    --bg-dark: #0f0f1a;
    --bg-gradient: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);

    /* Couleurs festives */
    --red-primary: #e63946;
    --red-glow: rgba(230, 57, 70, 0.4);
    --green-primary: #2a9d8f;
    --green-glow: rgba(42, 157, 143, 0.4);
    --gold-primary: #f4a261;
    --gold-glow: rgba(244, 162, 97, 0.4);
    --white-snow: #f8f9fa;

    /* Typographie */
    --font-main: 'Outfit', sans-serif;
    --font-fancy: 'Pacifico', cursive;

    /* Ombres */
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px var(--red-glow);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--white-snow);
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   ❄️ SNOW ANIMATION
   ============================================ */

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

.snowflake {
    position: absolute;
    top: -20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    pointer-events: auto;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.snowflake:hover {
    transform: scale(1.5) rotate(180deg);
}

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* ============================================
   🎊 CONFETTI
   ============================================ */

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

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

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

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

/* ============================================
   🎵 MUSIC BUTTON
   ============================================ */

.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.music-btn.playing {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   📦 MAIN LAYOUT
   ============================================ */

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* ============================================
   🃏 GLASS CARD
   ============================================ */

.card {
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

/* ============================================
   🏷️ BADGE
   ============================================ */

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red-primary);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--red-glow);
}

.badge.success {
    background: var(--green-primary);
    box-shadow: 0 4px 15px var(--green-glow);
}

.badge.admin {
    background: var(--gold-primary);
    box-shadow: 0 4px 15px var(--gold-glow);
}

/* ============================================
   📝 TYPOGRAPHY
   ============================================ */

.title {
    font-family: var(--font-fancy);
    font-size: 2.5rem;
    text-align: center;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--gold-primary), var(--red-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.emoji-bounce {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    -webkit-text-fill-color: initial;
}

.emoji-bounce:last-child {
    animation-delay: 0.5s;
}

@keyframes bounce {

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

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

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-top: 8px;
    letter-spacing: 1px;
}

.decorative-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    margin: 30px 0;
}

/* ============================================
   📋 FORM STYLES
   ============================================ */

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    color: white;
    font-family: var(--font-main);
    transition: var(--transition-smooth);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px var(--gold-glow);
}

/* ============================================
   🔘 BUTTONS
   ============================================ */

.btn {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red-primary), #c1121f);
    color: white;
    box-shadow: 0 4px 20px var(--red-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--red-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Button ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   ⚠️ ERROR MESSAGE
   ============================================ */

.error-message {
    text-align: center;
    color: var(--red-primary);
    font-weight: 600;
    margin-top: 16px;
    padding: 12px;
    background: rgba(230, 57, 70, 0.1);
    border-radius: 8px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

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

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* ============================================
   💰 BUDGET INFO
   ============================================ */

.budget-info {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.budget-info strong {
    color: var(--gold-primary);
}

/* ============================================
   🎁 REVEAL SECTION
   ============================================ */

.reveal-greeting {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 20px;
    color: var(--white-snow);
}

.reveal-greeting span {
    color: var(--gold-primary);
    font-family: var(--font-fancy);
}

.mission-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.mission-label {
    display: inline-block;
    background: var(--green-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.fun-message {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.giftee-reveal {
    margin-top: 20px;
}

.gift-box {
    font-size: 4rem;
    display: inline-block;
    animation: gift-bounce 1s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gift-box:hover {
    transform: scale(1.2) rotate(10deg);
}

@keyframes gift-bounce {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

.giftee-name {
    font-family: var(--font-fancy);
    font-size: 2.5rem;
    color: var(--gold-primary);
    margin-top: 16px;
    text-shadow: 0 0 30px var(--gold-glow);
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        text-shadow: 0 0 20px var(--gold-glow);
    }

    50% {
        text-shadow: 0 0 40px var(--gold-glow), 0 0 60px var(--gold-glow);
    }
}

.mission-footer {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ============================================
   👑 ADMIN SECTION
   ============================================ */

.admin-list {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.admin-item .giver {
    color: var(--white-snow);
    font-weight: 600;
}

.admin-item .arrow {
    color: var(--gold-primary);
}

.admin-item .receiver {
    color: var(--green-primary);
    font-weight: 600;
}

.admin-item {
    flex-wrap: wrap;
}

.admin-item .category {
    flex-basis: 100%;
    margin-top: 4px;
    color: var(--gold-primary);
    font-size: 0.8rem;
}

/* ============================================
   🎨 GIFT CATEGORY + DEMO MODE
   ============================================ */

.category-reveal {
    margin-top: 28px;
    padding: 20px;
    border: 2px dashed var(--gold-primary);
    border-radius: 16px;
    background: rgba(244, 162, 97, 0.08);
    opacity: 0;
    animation: category-in 0.6s ease-out 1.2s forwards;
}

.category-label {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--gold-primary);
    margin-bottom: 10px;
}

.category-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white-snow);
    line-height: 1.4;
}

@keyframes category-in {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.categories-intro {
    margin: 12px 0 16px;
    color: rgba(255, 255, 255, 0.8);
}

.categories-list {
    list-style: none;
}

.categories-list li {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--gold-primary);
    font-weight: 600;
}

.demo-banner {
    width: 100%;
    max-width: 500px;
    margin: 24px 0 28px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(233, 196, 106, 0.15);
    border: 1px solid rgba(233, 196, 106, 0.5);
    color: #e9c46a;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

/* ============================================
   🕺 SANTA DANCE (Easter Egg)
   ============================================ */

.santa-dance {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6rem;
    z-index: 2000;
    animation: dance 0.5s ease-in-out infinite;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
}

@keyframes dance {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(-10deg) scale(1);
    }

    25% {
        transform: translate(-50%, -50%) rotate(10deg) scale(1.1);
    }

    50% {
        transform: translate(-50%, -50%) rotate(-10deg) scale(1);
    }

    75% {
        transform: translate(-50%, -50%) rotate(10deg) scale(1.1);
    }
}

/* ============================================
   📄 FOOTER
   ============================================ */

footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
}

footer .hint {
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0.5;
}

/* ============================================
   🙈 UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

/* ============================================
   📱 RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }

    .title {
        font-size: 2rem;
    }

    .giftee-name {
        font-size: 2rem;
    }

    .gift-box {
        font-size: 3rem;
    }

    .btn {
        padding: 14px 24px;
        font-size: 1rem;
    }
}

/* ============================================
   🎨 SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--red-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}