:root {
    --primary: #00c853;
    --primary-hover: #009624;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --winter-gradient: linear-gradient(135deg, #e0f7fa 0%, #80deea 100%);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* Prevent scrolling of the background */
}

/* Fake Site Content (Sportsbook Layout) */
.fake-site-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: blur(4px); /* Reduced blur to make it recognizable */
    opacity: 0.8;
    pointer-events: none;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.fake-navbar {
    height: 60px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    flex-shrink: 0;
}

.fake-logo {
    display: flex;
    align-items: center;
}

.fake-nav-links {
    display: flex;
    gap: 24px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
}

.fake-nav-links span.active {
    color: #fff;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 18px;
    margin-bottom: -20px;
}

.fake-auth {
    display: flex;
    gap: 12px;
}

.fake-login {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
}

.fake-join {
    background: #fbbf24;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 4px;
}

/* Layout Grid */
.fake-layout {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    height: calc(100% - 60px);
    background: #0f172a;
}

/* Sidebar */
.fake-sidebar {
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fake-menu-header {
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 8px;
}

.fake-menu-item {
    color: #cbd5e1;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fake-menu-item:hover {
    background: #334155;
}

.fake-menu-item .count {
    color: #64748b;
    font-size: 12px;
}

/* Main Feed */
.fake-feed {
    padding: 20px;
    overflow: hidden;
    background: #0f172a;
}

.fake-banner {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
}

.fake-banner h2 { margin: 0 0 8px 0; font-size: 24px; }
.fake-banner p { margin: 0; opacity: 0.9; }

.fake-live-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 700;
    margin-bottom: 16px;
}

.live-indicator {
    color: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Fake Voucher Rows */
.fake-voucher-row {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.store-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.logo-1 { background: #003087; } /* WH Blue */
.logo-2 { background: #ff6600; } /* 888 Orange */
.logo-3 { background: #00703c; } /* B365 Green */
.logo-4 { background: #2c3e50; } /* Unibet Dark */
.logo-5 { background: #e60012; } /* Sky Red */

.voucher-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.voucher-title {
    color: #1e293b;
    font-weight: 700;
    font-size: 16px;
}

.voucher-meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.voucher-action {
    flex-shrink: 0;
}

.fake-code-btn {
    background: #f1f5f9;
    color: #0f172a;
    border: 2px dashed #94a3b8;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

/* Right Sidebar Updates */
.deal-circle {
    width: 80px;
    height: 80px;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 900;
    font-size: 18px;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.deal-text {
    text-align: center;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
}

.promo-desc {
    font-size: 14px;
    opacity: 0.9;
}

/* Override fake-feed background for voucher look */
.fake-feed {
    background: #f8fafc; /* Lighter background for voucher list */
}

.fake-layout {
    background: #f8fafc;
}

.fake-sidebar {
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

.fake-menu-item {
    color: #475569;
}

.fake-menu-item:hover {
    background: #f1f5f9;
}

.fake-navbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.fake-logo {
    color: #0f172a;
}

.fake-nav-links span.active {
    color: #0f172a;
    border-bottom-color: #0f172a;
}

.fake-login {
    color: #475569;
}

/* Overlay Backdrop */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Slightly lighter to show the background better */
    z-index: 1;
}

/* Layout */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10; /* Above the backdrop */
    display: block; /* Changed from flex to block for better scroll handling */
    padding: 20px;
    box-sizing: border-box;
}

/* Card Design */
.card {
    margin: 40px auto; /* Center horizontally, add vertical spacing */
    background: rgba(30, 41, 59, 0.95); /* More opaque to stand out */
    backdrop-filter: blur(0px); /* No blur needed on card itself now */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, #0288d1 0%, #26c6da 100%);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '❄️';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.card-header::after {
    content: '❄️';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 32px;
    opacity: 0.3;
    animation: float 4s ease-in-out infinite reverse;
}

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

.partner-logo {
    max-width: 180px;
    height: auto;
    margin: 10px 0 20px 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.badge {
    display: inline-block;
    background: var(--winter-gradient);
    color: #006064;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.card-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card-body {
    padding: 40px 30px;
    text-align: center;
}

.card-body h2 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
    font-size: 15px;
}

/* Button */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.terms {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Result Area */
.hidden {
    display: none !important;
}

.voucher-box {
    background: #0f172a;
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.voucher-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

.code-display {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
}

.btn-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s;
}

.btn-copy:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.1);
}

.success-msg {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.error-msg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 20px;
}

footer {
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.6;
}

/* Voucher Preview */
.voucher-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.voucher-preview {
    background: #0f172a;
    border: 2px dashed #334155;
    border-radius: 8px;
    padding: 12px 24px;
    position: relative;
    opacity: 0.7;
}

.preview-text {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 2px;
    filter: blur(4px);
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon {
    font-size: 20px;
    background: #1e293b;
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.arrow-down {
    font-size: 20px;
    animation: bounce 2s infinite;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .modal-container {
        padding: 10px;
        /* Ensure scrolling works even if address bar changes height */
        height: 100dvh; 
        display: block; /* Reinforce block display */
    }

    .card {
        /* Remove margin: auto to avoid centering issues on small screens if content overflows */
        margin: 20px auto 80px auto; /* Add bottom margin to ensure button is reachable */
        width: 100%;
    }


    .card-header {
        padding: 24px 20px;
    }

    .card-header h1 {
        font-size: 22px;
    }

    .card-body {
        padding: 24px 20px;
    }

    .description {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .btn-primary {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    /* Ensure footer has space */
    footer {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}
