/*
===================================================================
MAIN STYLESHEET for Festival Greeting Script
===================================================================

This file controls the entire look and feel of your website.
To customize your site's appearance, colors, and fonts,
edit the variables in the :root section below.

===================================================================
*/


/*
===================================================================
1. :root - SITE-WIDE THEME & COLOR CONFIGURATION
===================================================================
EDITABLE: This is the main control panel for your site's theme.
Change the color and font values here to re-brand the entire script.
*/
:root {
    /* --- Fonts --- */
    --font-heading: 'Poppins', sans-serif; /* Font for main titles */
    --font-body: 'Inter', sans-serif;      /* Font for all other text */

    /* --- Colors --- */
    --bg-color: #0D0D0D;           /* Main page background */
    --primary-accent: #DFFF00;     /* Main highlight color (e.g., lime green) */
    --text-color: #FFFFFF;         /* Main text color */
    --card-bg-color: #1A1A1A;     /* Background for cards, modals, footer */
    --border-color: #333333;      /* Border color for cards and inputs */
    
    /* --- Sizing --- */
    --border-radius: 12px;         /* Roundness for cards and modals */
}


/*
===================================================================
2. GENERAL SETUP & SCROLLBAR
===================================================================
*/

/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background-color: var(--primary-accent);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}


/*
===================================================================
3. SHARED GLOBAL STYLES (Used on all pages)
===================================================================
*/

/* --- Background Video --- */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}
#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark overlay to make text readable */
    background: rgba(13, 13, 13, 0.7); 
    z-index: -1;
}

/* --- Buttons (Base Styles) --- */
.action-button {
    padding: 14px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid #000;
}
.action-button:hover {
    transform: translateY(-3px);
}

/* Primary Button (e.g., Shop Now, Customize) */
.action-button.primary {
    background-color: var(--primary-accent);
    color: #000;
    box-shadow: 4px 4px 0px #000;
}
.action-button.primary:hover {
    box-shadow: 6px 6px 0px #000;
}

/* Secondary Button (e.g., Share, Change BG) */
.action-button.secondary {
    background-color: var(--card-bg-color);
    color: var(--primary-accent);
    border: 2px solid var(--primary-accent);
}

/* WhatsApp Button */
.action-button.whatsapp {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: var(--text-color);
    border: none;
}

/* Download Button */
.action-button.download {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--primary-accent);
    box-shadow: 4px 4px 0px var(--primary-accent);
}
.action-button.download:hover {
    box-shadow: 6px 6px 0px var(--primary-accent);
}

/* --- Music Toggle Button (Top Right) --- */
.control-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
}

/* --- Share Modal (Popup) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 8px 8px 0px var(--primary-accent);
    max-height: 90vh; /* Ensures modal is scrollable on small screens */
    overflow-y: auto;
}
.modal-content h2 {
    margin-bottom: 15px;
    color: var(--primary-accent);
}
.modal-share-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}


/*
===================================================================
4. INDEX.HTML - MAIN PAGE STYLES
===================================================================
*/

/* --- Full-screen scroll sections --- */
.scroll-section {
    width: 100%;
    display: grid;
    place-items: center;
    position: relative;
    padding: 60px 20px;
    overflow: hidden;
}
#greeting-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* --- Animated background text (SHARE, DOWNLOAD, etc.) --- */
.kinetic-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(4rem, 25vw, 18rem); /* Responsive font size */
    color: rgba(255, 255, 255, 0.05); /* Very faint text */
    position: absolute;
    white-space: nowrap;
    z-index: 1;
    animation: text-reveal 1.5s forwards;
    opacity: 0;
}
@keyframes text-reveal {
    from { letter-spacing: -1.5vw; opacity: 0; transform: scale(1.2); }
    to { letter-spacing: 0; opacity: 1; transform: scale(1); }
}

/* --- Main content cards (on index.html) --- */
.feature-card, .content-wrapper {
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    z-index: 2; /* Sits on top of the kinetic-text */
    position: relative;
    box-shadow: 8px 8px 0px var(--primary-accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px var(--primary-accent);
}
.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin-bottom: 15px;
}
.feature-card p {
    font-size: 1rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
}
.content-wrapper {
    margin-bottom: 20px; /* Space for the "Customize" button */
}

/* --- Greeting Card & Flip Form --- */
.card-container {
    width: 100%;
    perspective: 1000px;
    position: relative;
    height: 450px; /* Fixed height for the card */
    margin-bottom: 20px;
}
.greeting-card, .customization-form {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    backface-visibility: hidden; /* Hides the back of the card when flipped */
    transition: transform 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
}

/* Front of the card */
.greeting-card {
    background-color: transparent;
    overflow: hidden;
    z-index: 2;
}
/* Back of the card (form) */
.customization-form {
    padding: 30px;
    background-color: var(--card-bg-color);
    transform: rotateY(180deg);
    z-index: 1;
}

/* Flip animation classes */
.card-container.flipped .greeting-card {
    transform: rotateY(-180deg);
}
.card-container.flipped .customization-form {
    transform: rotateY(0deg);
    z-index: 2;
}

/* Card inner background (image/color from bg.html) */
.card-inner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    background-size: cover;
    background-position: center;
    z-index: -1;
    border-radius: var(--border-radius);
    opacity: 0.5; /* Dims the card background to make text readable */
}
.card-content-wrapper {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
}
.quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    flex-grow: 1;
    text-align: center;
    text-shadow: 0 2px 4px #000;
    max-height: 300px; /* Allows message to scroll if very long */
    overflow-y: auto;
    padding-right: 10px;
}
/* Custom scrollbar for the quote text */
.quote::-webkit-scrollbar { width: 6px; }
.quote::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.quote::-webkit-scrollbar-thumb { background-color: var(--primary-accent); border-radius: 10px; }

.from-name {
    background: rgba(0,0,0,0.4);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 1rem;
    align-self: center;
    flex-shrink: 0;
}

/* Form fields on the back of the card */
.customization-form h2 {
    margin-bottom: 20px;
    font-size: 1.6rem;
    text-align: center;
}
.customization-form textarea {
    min-height: 140px;
    resize: vertical;
}
.customization-form textarea, .customization-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: #000; /* Dark input background */
    color: var(--text-color);
    font-size: 1rem;
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    z-index: 10;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* "Scroll Down" indicator */
.scroll-indicator {
    color: var(--text-color);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
    z-index: 3;
    position: relative;
}
.scroll-indicator span {
    margin-right: 8px;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}


/*
===================================================================
5. QR CODE STYLING (Inside Share Modal)
===================================================================
*/
#modal-qrcode-display-area {
    margin-top: 30px;
}
#qr-code-sticker { 
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 8px 8px 0px var(--primary-accent);
    display: inline-block;
    width: 250px;
}
.qr-code-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-accent);
}
/* This holds the generated QR code */
#qr-code-image {
    background-color: white; /* QR codes require a white background */
    padding: 10px;
    border-radius: 8px;
    margin: 15px auto;
    display: inline-block;
    line-height: 0;
}
#qr-code-image img {
    max-width: 100%;
}
.qr-code-from {
    font-size: 1rem;
    margin-top: 5px;
    color: var(--text-color);
    font-style: italic;
}
#modal-download-qr-btn {
    width: 250px;
    margin: 20px auto 0 auto;
    display: block;
}


/*
===================================================================
6. BG.HTML & SHOP.HTML STYLES
===================================================================
*/

/* --- Page Containers --- */
.bg-selection-container, .shop-container {
    padding: 80px 20px; /* Top padding to clear the music button */
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}
.bg-header, .shop-container > h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-accent);
    font-size: 2.5rem;
}
.bg-header h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-top: 50px;
}

/* --- Selection Grids --- */
.bg-grid, .product-grid, .music-grid {
    display: grid;
    gap: 20px;
}
.bg-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.music-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Background/Video selection item */
.bg-item {
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
}
.bg-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 0px var(--primary-accent);
    border-color: var(--primary-accent);
}
.bg-item.selected {
    border-color: var(--primary-accent);
    box-shadow: 0 0 15px var(--primary-accent);
    transform: scale(1.05);
}
.bg-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}
.bg-item .overlay-text {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Music selection item */
.music-item {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 50px; /* Pill shape */
    padding: 12px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.music-item:hover {
    background-color: var(--border-color);
}
.music-item.selected {
    background-color: var(--primary-accent);
    color: #000;
    border-color: var(--primary-accent);
    font-weight: 600;
}

/* Color Picker Popup */
.color-picker-container {
    display: none; /* Hidden by default */
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px auto;
    max-width: 350px;
    text-align: center;
    position: relative;
}
.close-picker-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}
.color-picker-container label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
}
.color-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.color-input {
    height: 40px;
    width: 40px;
    border: 2px solid var(--border-color);
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    background: transparent;
}
.hex-input {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    text-transform: uppercase;
    text-align: center;
    width: 120px;
}

/* --- Shop Page Product Card --- */
.product-card-shop {
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 6px 0px var(--primary-accent);
}
.product-card-shop img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}
.product-card-shop h3 {
    color: var(--primary-accent);
    margin-bottom: 10px;
}
.product-card-shop p {
    flex-grow: 1; /* Pushes price/button to bottom */
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}
.price {
    color: var(--primary-accent);
    font-size: 1.2rem;
    font-weight: 600;
}


/*
===================================================================
7. RESPONSIVE MEDIA QUERIES
===================================================================
*/
@media (min-width: 768px) {
    /* On larger screens, make scroll sections fill the viewport height */
    .scroll-section {
        min-height: 100vh;
    }
}


/*
===================================================================
8. FOOTER
===================================================================
*/
.site-footer {
    padding: 30px 20px;
    text-align: center;
    background-color: var(--card-bg-color);
    border-top: 2px solid var(--border-color);
    position: relative;
    z-index: 5;
}
.footer-links {
    margin-bottom: 15px;
}
.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s ease;
    font-weight: 500;
}
.footer-links a:hover {
    color: var(--primary-accent);
}
.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}