/* Base Styling and Variables */
:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #f59e0b;
    --accent-green: #10b981;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(251, 191, 36, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

/* Background Effects */
.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(80px);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border-color) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

/* Container */
.container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 650px;
    width: 100%;
    z-index: 10;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: var(--accent-gold);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Section */
.hero {
    padding: 30px 40px 40px;
    text-align: center;
}

.badge-alert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-gold);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.headline {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.text-gradient {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sub-headline {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Media/Video Preview */
.media-container {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    background: #000;
}

.blur-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.4);
    transition: filter 0.3s ease;
}

.media-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.play-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.overlay-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* CTA Box */
.cta-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    width: 3%; /* Default to 14/500 */
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spots-left strong {
    color: var(--accent-gold);
    font-size: 1rem;
}

.cta-box h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.verification-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(245, 158, 11, 0.3);
}

.pulse-btn {
    animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Trust Signals */
.trust-signals {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex: 1;
}

.trust-icon {
    font-size: 1.2rem;
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 10px;
    border-radius: 50%;
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

/* CPA API Offers List Styling */
.offer-item {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 14px 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.offer-item:hover {
    background: rgba(251, 191, 36, 0.15); /* stronger gold tint */
    border-color: rgba(251, 191, 36, 0.6);
    transform: translateX(6px);
}

.offer-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    width: 100%;
    display: block;
}

.offer-icon {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-right: 12px;
}

/* Recommended Badge for First Offer */
.offer-item.recommended {
    position: relative;
    border: 1px solid var(--accent-gold);
    background: rgba(251, 191, 36, 0.08);
}

.recommended-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: linear-gradient(135deg, var(--accent-gold), #d97706);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
    text-transform: uppercase;
}

/* Modal Pop-up Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(251, 191, 36, 0.1);
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.1rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ef4444;
}

.modal-body {
    padding: 25px;
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
}

.modal-desc strong {
    color: var(--text-primary);
}

.modal-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-footer i {
    color: var(--accent-green);
    margin-right: 5px;
}

/* Mobile Responsiveness */
@media (max-width: 500px) {
    .container {
        border-radius: 16px;
        border: none;
    }
    
    body {
        padding: 0;
    }

    .hero {
        padding: 25px 20px 30px;
    }

    .headline {
        font-size: 1.8rem;
    }

    .trust-signals {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .trust-item {
        flex-direction: row;
        width: 100%;
        max-width: 200px;
        justify-content: flex-start;
    }
}
