/* Cacau Show Identity */
:root {
    --primary-brown: #3D1F14;
    --secondary-gold: #C5A059;
    --accent-cream: #FFF8F0;
    --text-dark: #2C2C2C;
    --text-light: #F5F5F5;
    --shadow-soft: 0 4px 15px rgba(61, 31, 20, 0.08);
    --shadow-medium: 0 8px 25px rgba(61, 31, 20, 0.15);
    --shadow-hover: 0 12px 30px rgba(197, 160, 89, 0.25);
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--accent-cream);
    /* Subtle Cocoa Texture Pattern */
    background-image: radial-gradient(#C5A059 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #fffbf5;
    color: var(--primary-brown);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Header Refined */
header {
    background-color: #fff; /* White header for cleaner look */
    border-bottom: 3px solid var(--secondary-gold);
    padding: 1rem 0;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo-container img {
    max-height: 50px;
}

.icon-btn, .menu-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-brown);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.icon-btn:hover, .menu-icon:hover {
    color: var(--secondary-gold);
}

.header-actions {
    display: flex;
    gap: 15px;
}

main {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.container {
    background: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    max-width: 700px; /* Slightly wider */
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-serif);
    color: var(--primary-brown);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.05rem;
}

/* Buttons */
.cta-button {
    background: linear-gradient(135deg, var(--secondary-gold) 0%, #b08d4a 100%);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.cta-button:hover::after {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.5);
}

.pulse-btn {
    display: inline-block;
    text-decoration: none;
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 10px 25px rgba(197, 160, 89, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4); }
}

/* Sections visibility */
section {
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

section.active {
    display: block;
}

/* Progress Bar Refined */
.progress-container {
    margin-bottom: 2.5rem;
    text-align: center;
}

.progress-bar-bg {
    width: 100%;
    background-color: #f0e6d2;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-gold), #ffd700);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.progress-text {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quiz Options Refined */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.option-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.2rem;
    font-size: 1.1rem;
    color: var(--primary-brown);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    font-family: var(--font-sans);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-btn:hover {
    border-color: var(--secondary-gold);
    background-color: #fffbf0;
    transform: translateX(5px);
    box-shadow: var(--shadow-soft);
}

.option-btn.selected {
    background-color: var(--secondary-gold);
    color: #fff;
    border-color: var(--secondary-gold);
    box-shadow: var(--shadow-medium);
}

.option-btn i {
    font-size: 1.4rem;
    opacity: 0.7;
}

.option-btn:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Loading Steps Refined */
.loading-section {
    text-align: center;
    padding: 2rem 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(197, 160, 89, 0.2);
    border-top: 5px solid var(--secondary-gold);
    border-radius: 50%;
    margin: 0 auto 2.5rem;
    animation: spin 1s linear infinite;
}

.validation-steps {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.step {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.5;
    transition: all 0.5s ease;
    font-size: 1.05rem;
}

.step.active {
    opacity: 1;
    font-weight: 600;
    color: var(--primary-brown);
}

.step i {
    color: var(--secondary-gold);
    font-size: 1.3rem;
}

/* Result Offer Card Refined */
.offer-card {
    background: linear-gradient(135deg, #fffbf0 0%, #fff 100%);
    border: 2px dashed var(--secondary-gold);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2.5rem 0;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.offer-card h3 {
    color: var(--price-red);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
}

.offer-card p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Footer Refined */
footer {
    background-color: var(--primary-brown);
    color: #e0e0e0;
    padding: 3rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 5px solid var(--secondary-gold);
    margin-top: -50px; /* Pull footer up to cover whitespace */
    position: relative;
    z-index: 10;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-gold);
}

.footer-security {
    margin-bottom: 2rem;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #4CAF50; /* Green for security */
}

/* Reviews Section Refined */
.reviews-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.reviews-section h3 {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--secondary-gold);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.review-card {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--secondary-gold);
}

.review-header strong {
    color: #fff;
    display: block;
    font-size: 0.95rem;
}

.stars {
    color: #FFD700;
    font-size: 0.8rem;
}

.review-card p {
    color: #ccc;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.time-ago {
    font-size: 0.75rem;
    color: #888;
    display: block;
    text-align: right;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section Refined */
.hero-section.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
    text-align: center;
    width: 100%;
}

.hero-section h1 {
    font-size: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Active Users Pulse */
.active-users {
    margin: 1rem 0 2rem;
    font-size: 0.95rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    display: inline-flex;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.pulse {
    color: #2ecc71;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Notifications Refined */
.notification-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10001; /* High z-index to be on top of everything */
    pointer-events: none;
}

.notification {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-left: 5px solid var(--secondary-gold);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), fadeOut 0.5s ease-in 4.5s forwards;
    max-width: 350px;
    pointer-events: auto; /* Allow interaction */
}

.notification-icon {
    background-color: var(--accent-cream);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-gold);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-text {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #333;
    text-align: left;
}

.notification-text strong {
    color: var(--primary-brown);
    margin-bottom: 2px;
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

/* Media Queries */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
        margin: 0;
        border-radius: 0;
        min-height: calc(100vh - 85px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-shadow: none;
        max-width: 100%;
        border: none;
    }
    
    main {
        padding: 0;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    p {
        font-size: 0.95rem;
    }

    .options-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 0.8rem;
    }

    .option-btn {
        min-height: 50px;
    }

    footer {
        margin-top: 0;
    }
    
    .option-text {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .notification-container {
        bottom: 10px;
        right: 10px;
        left: 10px; /* Center on mobile */
    }
    
    .notification {
        max-width: 100%;
        font-size: 0.9rem;
    }
    
    .offer-card {
        padding: 1.5rem;
    }
    
    .coupon-code {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
        width: 100%;
        justify-content: space-between;
    }
    
    .cta-button {
        width: auto;
        min-width: 200px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}
