: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: 20px auto; /* Reduced margin */
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(0px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    width: 100%;
    max-width: 420px;
    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;
    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: 160px;
    height: auto;
    margin: 0 auto 10px auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

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

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

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

.description {
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: left;
}

.highlight-text {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
    text-align: center;
}

.steps-header {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.steps-list {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
}

.steps-list li {
    margin-bottom: 6px;
    padding-left: 4px;
}

.steps-list li::marker {
    color: #06b6d4; /* Cyan marker color */
    font-weight: 700;
}

/* New Button Style */
.get-code-btn {
    display: flex;
    width: 100%;
    max-width: 340px;
    height: auto; /* Allow height to be determined by content/padding */
    margin: 0 auto 20px auto;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
    overflow: visible; /* Essential for the peel effect */
    font-weight: 700;
    font-size: 1.125rem; /* text-lg */
    line-height: 1.75rem;
}

.get-code-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* The main yellow button part (code-btn) */
.btn-left {
    background-color: #00c853; /* Green */
    color: #ffffff; /* White text */
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-around;
    border-top-left-radius: 0.5rem; /* rounded-l-lg */
    border-bottom-left-radius: 0.5rem;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    transition: background-color 0.2s;
    z-index: 20; /* Ensure it sits above the right part */
}

.btn-left:hover {
    background-color: #009624; /* Darker Green */
}

/* The small skew connector at the bottom right */
.btn-left::before {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    right: -0.875rem;
    width: 1.4375rem;
    height: 0.625rem;
    background-color: #00c853; /* Green */
    transform: skewX(12deg);
    z-index: 10;
    transition: background-color 0.2s;
}

.btn-left:hover::before {
    background-color: #009624; /* Darker Green */
}

/* The peel effect */
.btn-left::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    right: -2.375rem;
    width: 3.5rem;
    height: 100%;
    margin-top: 0.5rem;
    background: linear-gradient(38deg, #69f0ae, #69f0ae 49%, transparent 50%, transparent); /* Light Green */
    background-position: 0 4px;
    background-repeat: no-repeat;
    transform: rotate(20deg) translateY(-10px) scaleX(0.8);
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(-1px 8px 5px rgba(0,0,0,0.4));
}

/* The revealed code part */
.btn-right {
    background-color: #e8f5e9; /* Very Light Green */
    border: 2px dotted #00c853; /* Green */
    border-left: none; /* Hide left border */
    border-top-right-radius: 0.5rem; /* rounded-r-lg */
    border-bottom-right-radius: 0.5rem;
    padding: 0.75rem 0.5rem 0.75rem 0.25rem; /* py-3 pl-1 pr-2 */
    color: #1b5e20; /* Dark Green Text */
    display: flex;
    align-items: center;
    line-height: 1.25;
    letter-spacing: 0.025em;
    position: relative;
    z-index: 1; /* Behind the left part */
}

/* Dashed line separator removed */
.btn-right::before {
    display: none;
}

/* Collapsible Terms */
.terms-collapse {
    text-align: left;
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
}

.terms-collapse summary {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.terms-collapse summary::after {
    content: '▼';
    font-size: 8px;
    margin-left: 4px;
}

.terms-collapse[open] summary::after {
    content: '▲';
}

.terms-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
    text-align: left;
}

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

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

.voucher-box {
    background: rgba(15, 23, 42, 0.6); /* Darker background */
    border: 2px dashed #00c853; /* Green border */
    border-radius: 12px;
    padding: 24px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative; /* For absolute positioning of copy button */
}

.code-display {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 28px;
    font-weight: 800;
    color: #00c853; /* Green text */
    letter-spacing: 2px;
    background: transparent;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 200, 83, 0.3);
}

.btn-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffd600; /* Yellow */
    color: #000;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    width: auto;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #ffea00;
    color: #000;
}

.success-msg {
    color: #00c853;
    font-size: 12px; /* Smaller */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.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: 20px;
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.6;
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .modal-container {
        padding: 10px;
        height: 100dvh; 
        display: block;
    }

    .card {
        margin: 10px auto 60px auto;
        width: 100%;
    }

    .card-header {
        padding: 20px;
    }

    .card-body {
        padding: 20px;
    }

    .description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    footer {
        margin-top: 10px;
        margin-bottom: 20px;
    }
}
