body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full viewport fit */
    text-align: center;
    overflow: hidden; /* Prevent unnecessary scroll */
    box-sizing: border-box;
    touch-action: manipulation; /* Faster touch response */
    position: relative;
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 40px 40px 80px 40px;
    max-width: 600px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: opacity 0.8s ease;
    z-index: 10;
    will-change: transform, opacity;
}

h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}
p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
}
.signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.8em;
    margin-top: 1em;
    color: #ffe;
}
.login-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: bold;
    color: #ff4e50;
    background: #fff;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}
.login-btn:hover {
    background: #ffe;
    color: #d6336c;
    transform: scale(1.05);
}

/* Login overlay */
#loginOverlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 1000;
}
#loginOverlay.active {
    opacity: 1;
    pointer-events: auto;
}
.login-box {
    position: relative;
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 40px;
    width: 350px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(220,20,60,0.6);
    backdrop-filter: blur(10px);
    will-change: transform, opacity;
}
.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: crimson;
    cursor: pointer;
    font-weight: bold;
}
.close-btn:hover { color: darkred; }
.login-box h2 { color: darkgreen; margin: 0 0 25px 0; font-size: 2em; }
.login-box input {
    margin: 12px 0;
    padding: 12px;
    width: 90%;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1em;
}
.login-box button {
    margin-top: 20px;
    padding: 12px 28px;
    background: crimson;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s;
}
.login-box button:hover { background: darkred; transform: scale(1.05); }
#message {
    margin-top: 15px;
    font-weight: bold;
    color: crimson;
    min-height: 24px;
}
.festive { font-size: 1.8em; margin-top: 20px; }

/* Full-screen falling snow */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}
.snowflake {
    color: #ffffff;
    text-shadow: 0 0 12px #00bfff, 0 0 24px #0099cc;
    font-size: 16px;
    position: absolute;
    top: -60px;
    opacity: 0.95;
    animation: fall linear infinite, sway ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes fall {
    to { top: calc(100% + 60px); }
}
@keyframes sway {
    from { transform: translateX(0); }
    to { transform: translateX(var(--drift)); }
}

/* 5 active snowflakes */
.snowflake:nth-child(1) { left: 1%; animation-duration: 14s, 8s; animation-delay: 0s, 0s; --drift: 80px; }
.snowflake:nth-child(2) { left: 6%; animation-duration: 18s, 10s; animation-delay: 2s, 1s; --drift: -100px; }
.snowflake:nth-child(3) { left: 11%; animation-duration: 16s, 12s; animation-delay: 4s, 2s; --drift: 120px; }
.snowflake:nth-child(4) { left: 16%; animation-duration: 20s, 9s; animation-delay: 6s, 3s; --drift: -80px; }
.snowflake:nth-child(5) { left: 21%; animation-duration: 15s, 11s; animation-delay: 1s, 0.5s; --drift: 100px; }

/* Disable snow and blur on mobile */
@media (max-width: 768px) {
    .snowflakes {
        display: none !important;
    }
    .snowflake {
        animation: none !important;
    }
    .card, .login-box {
        backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.3);
    }
}