/* Winter Wonderland Theme */
:root {
    --snow-white: #FFFFFF;
    --ice-blue: #E3F2FD;
    --winter-blue: #64B5F6;
    --deep-blue: #1976D2;
    --christmas-red: #D32F2F;
    --christmas-green: #388E3C;
    --gold: #FFD700;
    --silver: #C0C0C0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #1e3a8a 0%, #60a5fa 50%, #e0f2fe 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Falling Snow Animation */
.snowflakes {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: white;
    font-size: 1.5em;
    opacity: 0.8;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 15s; animation-delay: 0s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 3s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 13s; animation-delay: 1s; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 9s; animation-delay: 2s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 14s; animation-delay: 0s; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 10s; animation-delay: 1.5s; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 12s; animation-delay: 0.5s; }
.snowflake:nth-child(11) { left: 5%; animation-duration: 13s; animation-delay: 2.5s; }
.snowflake:nth-child(12) { left: 15%; animation-duration: 9s; animation-delay: 1s; }
.snowflake:nth-child(13) { left: 25%; animation-duration: 11s; animation-delay: 0s; }
.snowflake:nth-child(14) { left: 35%; animation-duration: 10s; animation-delay: 2s; }
.snowflake:nth-child(15) { left: 45%; animation-duration: 14s; animation-delay: 1.5s; }
.snowflake:nth-child(16) { left: 55%; animation-duration: 8s; animation-delay: 3s; }
.snowflake:nth-child(17) { left: 65%; animation-duration: 12s; animation-delay: 0.5s; }
.snowflake:nth-child(18) { left: 75%; animation-duration: 10s; animation-delay: 2.5s; }
.snowflake:nth-child(19) { left: 85%; animation-duration: 15s; animation-delay: 1s; }
.snowflake:nth-child(20) { left: 92%; animation-duration: 9s; animation-delay: 0s; }
.snowflake:nth-child(21) { left: 3%; animation-duration: 11s; animation-delay: 1.5s; }
.snowflake:nth-child(22) { left: 12%; animation-duration: 13s; animation-delay: 2s; }
.snowflake:nth-child(23) { left: 22%; animation-duration: 10s; animation-delay: 0.5s; }
.snowflake:nth-child(24) { left: 32%; animation-duration: 14s; animation-delay: 3s; }
.snowflake:nth-child(25) { left: 42%; animation-duration: 12s; animation-delay: 1s; }

@keyframes fall {
    from {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }
    to {
        top: 110%;
        transform: translateX(100px) rotate(360deg);
    }
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.5s ease-out;
    position: relative;
    z-index: 2;
}

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

.login-box h1 {
    color: var(--christmas-green);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: var(--christmas-red);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.snowman {
    font-size: 4rem;
    margin: 1rem 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.login-box input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--winter-blue);
    border-radius: 10px;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.login-box input:focus {
    border-color: var(--deep-blue);
}

.login-box button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--christmas-green), var(--christmas-red));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-box button:hover {
    transform: scale(1.05);
}

.error {
    color: var(--christmas-red);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Main Application */
.main-app {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

header h1 {
    color: var(--christmas-red);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header-subtitle {
    color: var(--christmas-green);
    font-size: 1.2rem;
    font-weight: bold;
}

.logout-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--christmas-red);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #B71C1C;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Add Gift Form Section */
.add-gift-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.add-gift-section h2 {
    color: var(--christmas-green);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--deep-blue);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid var(--winter-blue);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--deep-blue);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--christmas-green), var(--christmas-red));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: scale(1.02);
}

/* All Lists Section */
.all-lists-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.all-lists-section h2 {
    color: var(--christmas-red);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.all-lists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.person-card {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.person-card:hover {
    transform: translateY(-5px);
}

.person-card h3 {
    color: var(--christmas-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.progress-container {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--christmas-green), var(--gold));
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.gift-items {
    list-style: none;
}

.gift-item {
    background: white;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.gift-item h4 {
    color: var(--deep-blue);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.gift-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.gift-item a {
    color: var(--winter-blue);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

.gift-item a:hover {
    text-decoration: underline;
}

.delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--christmas-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #B71C1C;
}

.no-items {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .all-lists {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 2rem;
    }

    .logout-btn {
        position: static;
        width: 100%;
        margin-top: 1rem;
    }
}
