/* ===================================
   Christmas List - Styles
   =================================== */

/* CSS Variables for easy theming */
:root {
    --primary-red: #C41E3A;
    --primary-green: #165B33;
    --dark-green: #0F3D22;
    --gold: #D4AF37;
    --light-gold: #F4E5C2;
    --snow-white: #FFFAFA;
    --ice-blue: #E8F4F8;
    --warm-white: #FFF5E6;
    --dark-text: #2C3E50;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
    --purchased-bg: #e8f5e9;
    --purchased-border: #4caf50;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* ===================================
   Snowflakes Animation
   =================================== */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

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

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 2s; font-size: 2rem; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 4s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 1s; font-size: 1.8rem; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 3s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 5s; font-size: 2.2rem; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 0s; font-size: 1.7rem; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 4s; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 11s; animation-delay: 1s; font-size: 1.9rem; }

@keyframes fall {
    0% {
        top: -10%;
        opacity: 0.8;
    }
    100% {
        top: 110%;
        opacity: 0.3;
    }
}

/* ===================================
   Christmas Lights Animation
   =================================== */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 998;
    pointer-events: none;
    padding: 0 2rem;
}

.light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    animation: glow 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px currentColor;
}

.light::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: #333;
}

.light.red {
    background: #ff0000;
    animation-delay: 0s;
}

.light.green {
    background: #00ff00;
    animation-delay: 0.3s;
}

.light.blue {
    background: #0088ff;
    animation-delay: 0.6s;
}

.light.yellow {
    background: #ffff00;
    animation-delay: 0.9s;
}

@keyframes glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ===================================
   Confetti Animation
   =================================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    animation: confetti-fall 3s linear forwards;
}

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

/* ===================================
   Gift Progress Tracker
   =================================== */
.gift-progress-tracker {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.6s ease-out;
}

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

.tracker-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tracker-icon {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

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

.tracker-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-text);
    flex: 1;
    min-width: 200px;
}

.tracker-purchased {
    color: var(--purchased-border);
    font-size: 1.5rem;
    font-weight: 700;
}

.tracker-total {
    color: var(--primary-red);
    font-weight: 700;
}

.progress-bar {
    flex: 1;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    min-width: 200px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--purchased-border) 100%);
    border-radius: 15px;
    transition: width 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmerProgress 2s infinite;
}

@keyframes shimmerProgress {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===================================
   Header Styles
   =================================== */
.header {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-green) 100%);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 6s infinite linear;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-decoration {
    font-size: 2rem;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.ornament {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.ornament:nth-child(2) {
    animation-delay: 1s;
}

.ornament:nth-child(3) {
    animation-delay: 2s;
}

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

.main-title {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 3.5rem;
    color: var(--snow-white);
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--warm-white);
    max-width: 700px;
    margin: 1rem auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ===================================
   Instructions
   =================================== */
.instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.instruction-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instruction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.instruction-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.instruction-card p {
    font-size: 0.95rem;
    color: var(--dark-text);
    font-weight: 500;
}

/* ===================================
   Section Styles
   =================================== */
.list-section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.person-name {
    background: linear-gradient(135deg, var(--gold) 0%, var(--light-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-decoration {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1.5rem;
}

.section-decoration span {
    animation: twinkle 2s ease-in-out infinite;
}

.section-decoration span:nth-child(2) {
    animation-delay: 0.5s;
}

.section-decoration span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===================================
   Products Grid
   =================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* ===================================
   Product Card
   =================================== */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 3px solid transparent;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 3px;
    background: linear-gradient(45deg, var(--primary-red), var(--gold), var(--primary-green), var(--gold), var(--primary-red));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px var(--shadow-hover), 0 0 30px rgba(212, 175, 55, 0.3);
}

.product-card:hover::before {
    opacity: 1;
    animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.product-card.purchased {
    background: var(--purchased-bg);
    border: 3px solid var(--purchased-border);
    opacity: 0.7;
}

.product-card.purchased::after {
    content: '✓ PURCHASED';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--purchased-border);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.product-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--ice-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-red);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 2.8rem;
}

.product-price {
    font-size: 1.3rem;
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, #a01628 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a01628 0%, var(--primary-red) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: var(--primary-green);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 91, 51, 0.3);
}

.btn-secondary.purchased {
    background: var(--purchased-border);
}

.btn-secondary.purchased:hover {
    background: #388e3c;
}

/* ===================================
   Footer
   =================================== */
.footer {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 15px;
    margin-top: 3rem;
    box-shadow: 0 5px 15px var(--shadow);
    border: 2px solid var(--gold);
}

.footer-message {
    max-width: 800px;
    margin: 0 auto;
}

.footer-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-family: 'Mountains of Christmas', cursive;
}

.footer-jesus {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    font-family: 'Mountains of Christmas', cursive;
}

.footer-note {
    font-size: 1rem;
    color: var(--dark-text);
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.footer-verse {
    font-size: 1rem;
    color: var(--primary-green);
    font-weight: 600;
    font-style: italic;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(22, 91, 51, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary-green);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .header-decoration {
        font-size: 1.5rem;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .instructions {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .snowflake {
        font-size: 1.2rem;
    }

    /* Progress tracker mobile optimization */
    .tracker-content {
        flex-direction: column;
        text-align: center;
    }

    .tracker-icon {
        font-size: 2rem;
    }

    .tracker-text {
        font-size: 1rem;
    }

    .progress-bar {
        width: 100%;
    }

    /* Christmas lights mobile */
    .christmas-lights {
        height: 60px;
        padding: 0 1rem;
    }

    .light {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .product-image-container {
        height: 200px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }
}

/* ===================================
   Loading Animation
   =================================== */
.loading {
    text-align: center;
    padding: 3rem;
    color: white;
    font-size: 1.2rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .snowflakes {
        display: none;
    }

    body {
        background: white;
    }

    .btn-secondary {
        display: none;
    }
}
