/* Custom styles for Secret Santa app */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation for the draw result */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animation-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.draw-result {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Custom button styles */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:active {
    transform: translateY(1px);
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Notification animation */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

#success-notification {
    animation: slideIn 0.3s ease-out forwards;
    z-index: 1000;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-8xl {
        font-size: 4rem;
        line-height: 1;
    }
    
    .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-white {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for the gift box */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gift-icon {
    display: inline-block;
    animation: bounce 2s infinite;
}

body {
    position: relative;
    overflow-x: hidden;
    background-color: #020617; /* deep night base so snow is visible */
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(34,197,94,0.75), transparent 55%),   /* lighter festive green */
        radial-gradient(circle at 100% 0%, rgba(220,38,38,0.8), transparent 55%),  /* brighter red */
        radial-gradient(circle at 50% 100%, rgba(37,99,235,0.75), transparent 60%);/* softer indigo */
    opacity: 1;
}

body::after {
    content: "";
    position: fixed;
    inset: -50px 0 0 0;
    pointer-events: none;
    background-image: radial-gradient(3px 3px at 10% 20%, rgba(255,255,255,0.9) 55%, transparent 55%),
                      radial-gradient(3px 3px at 80% 30%, rgba(255,255,255,0.9) 55%, transparent 55%),
                      radial-gradient(4px 4px at 40% 0%, rgba(255,255,255,0.85) 55%, transparent 55%),
                      radial-gradient(3px 3px at 20% 80%, rgba(255,255,255,0.9) 55%, transparent 55%),
                      radial-gradient(4px 4px at 70% 90%, rgba(255,255,255,0.9) 55%, transparent 55%);
    background-size: 160px 160px;
    background-repeat: repeat;
    background-position: 0 0;
    animation: snow-fall 12s linear infinite;
    opacity: 0.9;
}

@keyframes snow-fall {
    from { background-position-y: 0; }
    to { background-position-y: 200px; }
}

nav {
    backdrop-filter: blur(12px);
}

.bg-tree-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.bg-tree-layer::before {
    content: "";
    position: absolute;
    bottom: 130px;
    right: 10%;
    width: 260px;
    height: 360px;
    background-image: url('/static/img/tree.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom center;
}

.bg-tree-layer::after {
    content: "★";
    position: absolute;
    bottom: 210px;
    right: calc(8% + 85px);
    font-size: 28px;
    color: #fde68a;
    text-shadow: 0 0 12px rgba(250,250,210,0.7);
}

.bg-presents-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.bg-presents-layer::before {
    content: "";
    position: absolute;
    bottom: 180px;
    right: 5%;
    width: 320px;
    height: 200px;
    background-image: url('/static/img/presents.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom center;
}

.bg-snow-bank {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 600px;
    pointer-events: none;
    background-image: url('/static/img/snow-bank.png');
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: bottom center;
    z-index: 0;
}

/* Keep main page content above the snow bank background */
nav, main, footer {
    position: relative;
    z-index: 1;
}

button,
input[type="submit"],
.btn {
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(15, 118, 110, 0.2);
}

button:active,
input[type="submit"]:active,
.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.18);
}
