/* ========================================
   GLOBAL STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #7C3AED;
    --secondary-color: #A78BFA;
    --accent-color: #EC4899;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;

    /* Light Mode */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-card: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;

    /* Purple Gradients */
    --gradient: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
    --gradient-alt: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Theme */
body.dark-mode {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #1E293B;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --border-color: #334155;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: var(--gradient);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    color: white;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hero-btn {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   COUPONS SECTION
   ======================================== */
.coupons-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.loading {
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.coupon-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
    border: 2px solid var(--border-color);
}

.coupon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.coupon-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.discount-badge {
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.batch-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.coupon-code-box {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: var(--primary-color);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    border: 2px dashed var(--primary-color);
    box-shadow: var(--shadow-md);
}

.code-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.coupon-code {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.copy-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    opacity: 0.8;
}

.coupon-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.coupon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.validity {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.copy-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    box-shadow: var(--shadow-md);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.no-coupons {
    text-align: center;
    padding: 4rem 0;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ========================================
   HOW TO USE SECTION
   ======================================== */
.how-to-use {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: var(--bg-card);
    transition: all 0.3s;
    border: 2px solid var(--border-color);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-md);
}

.step-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
    font-weight: 600;
    transition: bottom 0.3s;
    z-index: 9999;
}

.toast.show {
    bottom: 30px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .stat-number {
        font-size: 1.5rem;
    }

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

    .coupons-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .header-content {
        justify-content: space-between;
    }

    .theme-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .coupon-card {
        padding: 1.5rem;
    }

    .coupon-code {
        font-size: 2rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .coupon-card {
        padding: 1.2rem;
    }

    .coupon-code {
        font-size: 1.8rem;
    }

    .discount-badge {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 1.5rem;
    }

    .nav {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .theme-toggle {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }

    .toast {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        max-width: 90%;
    }
}
