:root {
    --primary-dark: #002856;
    --primary-light: #00A7E1;
    --accent-red: #D32F2F;
    --accent-green: #2E7D32;
    --gold: #FFD700;
    --text-color: #002856;
    --bg-color: #f0f4f8;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(0, 40, 86, 0.2);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    /* Festive Gradient */
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Festive Typography */
.festive-title {
    font-family: 'Mountains of Christmas', cursive;
    color: var(--accent-red);
    font-size: 2.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.festive-subtitle {
    font-family: 'Mountains of Christmas', cursive;
    color: var(--accent-green);
    font-size: 2rem;
}

/* Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px dashed var(--primary-light);
}

.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Background Decorations (Emoji based for simplicity and performance) */
.decoration {
    position: fixed;
    font-size: 4rem;
    z-index: 0;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.top-left-tree { top: 5%; left: 5%; animation-delay: 0s; }
.top-right-santa { top: 10%; right: 5%; font-size: 5rem; animation-delay: 2s; }
.bottom-left-reindeer { bottom: 5%; left: 10%; animation-delay: 1s; }
.bottom-right-snowman { bottom: 10%; right: 10%; animation-delay: 3s; }

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Snowfall */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite;
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
}

@keyframes fall {
    0% { transform: translateY(-10vh) translateX(0); opacity: 1; }
    100% { transform: translateY(110vh) translateX(30px); opacity: 0; }
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow);
    border-radius: 20px;
}

/* Password Gate */
.gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}

.gate-card {
    padding: 40px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border-top: 5px solid var(--accent-red);
}

.gate-card p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    font-weight: 500;
}

.error-msg {
    color: var(--accent-red);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 15px;
    min-height: 1.2em;
}

/* Inputs & Buttons */
input[type="password"],
input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 15px;
    border: 2px solid #ccc;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 8px rgba(0, 167, 225, 0.3);
}

.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-light);
    color: var(--white);
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 167, 225, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 40, 86, 0.5);
}

.btn-large {
    font-size: 1.2rem;
    padding: 18px 35px;
    margin-top: 20px;
    background: var(--accent-green);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.btn-large:hover {
    background: #1b5e20;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.5);
}

/* Main Content */
main {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    opacity: 1;
    transition: opacity 0.8s ease;
}

main.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

header {
    padding: 30px 40px;
    text-align: center;
    margin-bottom: 30px;
    border-top: 5px solid var(--primary-dark);
}

header p {
    font-size: 1.15rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.form-section {
    padding: 40px;
}

.details-section {
    margin-bottom: 50px;
}

.details-section h3 {
    color: var(--primary-dark);
    font-weight: 800;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--primary-light);
    display: inline-block;
    padding-bottom: 5px;
}

.selection-section h3 {
    margin-bottom: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary-dark);
}

.selection-instruction {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: #555;
    font-weight: 500;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--white);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.product-card img {
    max-width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.product-card h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-weight: 700;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card.selected {
    border-color: var(--accent-green);
    background: #f0fff0;
}

.product-card.selected::after {
    content: '✓ Selected';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-green);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
    border-top: 2px dashed #ccc;
    padding-top: 30px;
}

.feedback-msg {
    margin-top: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-red);
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    transition: opacity 0.4s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.modal-card {
    padding: 50px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border-top: 6px solid var(--accent-green);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-card p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-weight: 600;
}

.modal-card .modal-subtext {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .form-section {
        padding: 20px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .product-card img {
        height: 150px;
    }
    .brand-name {
        font-size: 1.5rem;
    }
    .festive-title {
        font-size: 2.2rem;
    }
    .decoration {
        font-size: 2.5rem;
    }
}
