/* ============================================
   GOODKEY - Jual Kunci Jawaban Soal Asesmen
   Main Stylesheet
   ============================================ */

:root {
    --primary: #1b2838;
    --primary-light: #2a475e;
    --accent: #66c0f4;
    --accent2: #a4d007;
    --success: #5ba83c;
    --info: #66c0f4;
    --warning: #f1c40f;
    --danger: #c84c4c;
    --dark: #171a21;
    --text: #c7d5e0;
    --text-light: #8f98a0;
    --text-muted: #626e79;
    --bg: #1b2838;
    --bg-alt: #1e2a3a;
    --card-bg: #2a3f5c;
    --card-hover: #314e6f;
    --border: #3d556b;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --transition: all 0.2s ease;
    --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

/* ==================== NAVBAR ==================== */
.navbar {
    background: var(--dark);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    border-bottom: 1px solid var(--primary-light);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.navbar-brand img {
    width: 28px;
    height: 28px;
}

.navbar-brand span {
    display: none;
}

@media (min-width: 500px) {
    .navbar-brand span { display: inline; }
    .navbar-brand { font-size: 20px; }
}

/* Hamburger menu for mobile */
.navbar-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}

.navbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (min-width: 769px) {
    .navbar-toggle { display: none; }
}

.navbar-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    border-bottom: 2px solid var(--primary-light);
    padding: 8px 16px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.navbar-menu.open {
    display: flex;
}

@media (min-width: 769px) {
    .navbar-menu {
        position: static;
        display: flex;
        flex-direction: row;
        background: none;
        border-bottom: none;
        padding: 0;
        box-shadow: none;
        gap: 4px;
        align-items: center;
    }
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--primary-light);
    color: #fff;
}

.nav-link.active {
    color: #fff;
    background: rgba(102, 192, 244, 0.15);
}

.nav-link i { margin-right: 6px; width: 16px; text-align: center; }

.credit-badge {
    background: rgba(164, 208, 7, 0.2);
    color: var(--accent2);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Panic Button */
.panic-btn {
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.panic-btn:hover {
    background: #e05a5a;
    transform: scale(1.05);
}

.panic-btn.active {
    background: var(--accent2);
    color: var(--dark);
}

.panic-btn i { margin-right: 4px; }

@media (min-width: 769px) {
    .panic-btn { padding: 6px 12px; font-size: 13px; }
}

/* ==================== HERO ==================== */
.hero {
    text-align: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-light) 50%, var(--primary) 100%);
    border-radius: 0;
    margin: 0 -16px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero { margin: 0 -24px 32px; padding: 60px 24px; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.02) 40px,
        rgba(255,255,255,0.02) 80px
    );
}

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

.hero h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 800;
}

@media (min-width: 768px) {
    .hero h1 { font-size: 38px; }
}

.hero h1 img.coin-icon {
    width: 36px;
    height: 36px;
    vertical-align: middle;
    margin-right: 8px;
}

@media (min-width: 768px) {
    .hero h1 img.coin-icon { width: 44px; height: 44px; }
}

.hero p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 6px;
}

.hero-sub {
    font-size: 14px;
    opacity: 0.65;
}

/* ==================== TOAST ==================== */
#toast-container {
    position: fixed;
    top: 70px;
    right: 12px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: calc(100% - 24px);
}

@media (min-width: 768px) {
    #toast-container { top: 80px; right: 24px; }
}

.toast-el {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease;
    word-break: break-word;
}

@media (min-width: 768px) {
    .toast-el { padding: 14px 20px; font-size: 14px; }
}

.toast-el.success { background: var(--success); color: #fff; }
.toast-el.error { background: var(--danger); color: #fff; }
.toast-el.info { background: var(--info); color: #fff; }
.toast-el.warning { background: var(--warning); color: var(--dark); }

@keyframes toastIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.filter-tabs {
    display: flex;
    gap: 6px;
    padding-bottom: 4px;
    flex-wrap: nowrap;
}

@media (min-width: 600px) {
    .filter-tabs { flex-wrap: wrap; }
}

.filter-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-light);
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(102, 192, 244, 0.1);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(102, 192, 244, 0.3);
}

.filter-btn i { margin-right: 5px; }

/* ==================== PRODUCTS GRID ==================== */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 40px;
}

@media (min-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .product-card { padding: 20px; }
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    background: var(--card-hover);
}

.product-card[style*="display: none"] {
    display: none !important;
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.product-subject {
    display: inline-block;
    background: rgba(102, 192, 244, 0.1);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 8px;
}

.product-icon {
    font-size: 36px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}

.product-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.product-card .product-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .product-title { font-size: 16px; }
}

.product-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.4;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent2);
}

.product-price i { margin-right: 4px; }

.product-price small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==================== PANIC MODE ==================== */
.panic-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 40px;
}

@media (min-width: 480px) {
    .panic-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .panic-products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.panic-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panic-card .panic-game {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.panic-card .panic-account {
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
}

.panic-card .panic-price {
    font-size: 13px;
    color: var(--accent2);
    font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #7dd5ff);
    color: var(--dark);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 192, 244, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #6dc04a);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 168, 60, 0.3);
}

.btn-secondary {
    background: var(--primary-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-hover);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #d86060;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ==================== HOW IT WORKS ==================== */
.how-it-works {
    text-align: center;
    padding: 32px 0;
    margin-bottom: 24px;
}

.how-it-works h2 {
    font-size: 22px;
    margin-bottom: 24px;
    color: #fff;
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.step {
    background: var(--card-bg);
    padding: 28px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
    transition: var(--transition);
}

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

.step i {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 12px;
}

.step h4 {
    font-size: 15px;
    margin-bottom: 6px;
    color: #fff;
}

.step p {
    font-size: 13px;
    color: var(--text-light);
}

/* ==================== PRODUCT DETAIL ==================== */
.product-detail-page { max-width: 900px; margin: 0 auto; }
.back-link { margin-bottom: 16px; }
.product-detail-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .product-detail-card {
        grid-template-columns: 1fr 1.2fr;
        gap: 30px;
        padding: 30px;
    }
}

.pd-left { text-align: center; }
.pd-image { max-width: 100%; max-height: 250px; border-radius: var(--radius-sm); object-fit: contain; }
.pd-icon { font-size: 64px; color: var(--text-muted); }
.pd-right h1 { font-size: 20px; color: #fff; margin-bottom: 10px; }
@media (min-width: 768px) { .pd-right h1 { font-size: 24px; } }
.pd-desc { color: var(--text-light); line-height: 1.6; margin-bottom: 16px; font-size: 13px; }
.pd-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pd-price-lg { font-size: 24px; font-weight: 800; color: var(--accent2); }
.pd-price-lg small { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.pd-actions { display: flex; flex-direction: column; gap: 10px; }
.pd-balance { font-size: 13px; color: var(--text-light); }
.pd-insufficient { color: var(--danger); font-size: 13px; padding: 10px; background: rgba(200,76,76,0.1); border-radius: var(--radius-sm); text-align: center; }

/* ==================== AUTH ==================== */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 50vh; padding: 16px;
}
.auth-card {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border); width: 100%; max-width: 400px;
}
@media (min-width: 768px) { .auth-card { padding: 32px; } }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header i { font-size: 36px; color: var(--accent); margin-bottom: 8px; }
.auth-header h2 { font-size: 20px; color: #fff; margin-bottom: 4px; }
.auth-header p { font-size: 13px; color: var(--text-light); }
.auth-form .form-group { margin-bottom: 16px; }
.auth-form label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text); font-size: 13px; }
.auth-form .form-control { padding: 10px 14px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-light); }

/* ==================== ACCOUNT PAGE ==================== */
.account-grid { display: grid; gap: 16px; max-width: 700px; margin: 0 auto; }
.account-card {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.balance-card {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: 1px solid var(--accent);
}
.balance-icon { font-size: 36px; color: var(--accent2); }
.balance-info { flex: 1; }
.balance-label { font-size: 13px; opacity: 0.8; display: block; }
.balance-value { font-size: 28px; font-weight: 800; color: #fff; }
.balance-value small { font-size: 14px; font-weight: 400; opacity: 0.8; }
.balance-idr { font-size: 13px; opacity: 0.6; display: block; }

/* ==================== TOP-UP PAGE (New) ==================== */
.topup-page { padding-bottom: 40px; }

.topup-balance-card {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-alt));
    border: 1px solid var(--accent2);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(164,208,7,0.1);
}

.topup-packages-section h3 {
    font-size: 1.2rem;
}

.topup-packages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .topup-packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .topup-packages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.topup-package-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topup-package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-color: var(--accent);
}

.topup-package-card.popular {
    border-color: var(--accent2);
    background: linear-gradient(135deg, var(--card-bg), rgba(164,208,7,0.08));
    box-shadow: 0 4px 24px rgba(164,208,7,0.15);
}

.topup-package-card.popular:hover {
    box-shadow: 0 8px 32px rgba(164,208,7,0.25);
}

.topup-package-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent2), #8bc34a);
    color: var(--dark);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.5px;
}

.topup-pkg-header {
    margin-top: 8px;
}

.topup-pkg-credits {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.topup-pkg-credits small {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
}

.topup-pkg-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent2);
    margin: 4px 0 8px;
}

.topup-pkg-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
    flex: 1;
}

.topup-pkg-rate {
    font-size: 13px;
    color: var(--text-light);
}

.topup-pkg-rate i {
    margin-right: 4px;
    color: var(--accent);
}

.topup-pkg-savings {
    font-size: 13px;
    color: var(--accent2);
    font-weight: 600;
    background: rgba(164,208,7,0.1);
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-block;
    align-self: center;
}

.topup-pkg-savings i {
    margin-right: 4px;
}

.topup-pkg-surplus {
    font-size: 12px;
    color: var(--success);
}

.topup-pkg-surplus i {
    margin-right: 4px;
}

.topup-pkg-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
}

.topup-pkg-btn:hover {
    transform: translateY(-2px);
}

.topup-after-purchase h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.topup-after-purchase p {
    font-size: 13px;
    line-height: 1.6;
}

/* Legacy package styles (keep for backward compat with old pages) */
.packages-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 768px) { .packages-grid { gap: 12px; } }
.package-card {
    background: var(--bg-alt); border-radius: var(--radius-sm);
    padding: 14px; text-align: center; border: 1px solid var(--border);
    position: relative; transition: var(--transition);
}
.package-card:hover { border-color: var(--accent); }
.package-card.popular { border-color: var(--warning); background: rgba(241,196,15,0.05); }
.package-credits { font-size: 20px; font-weight: 700; color: #fff; }
.package-credits small { font-size: 12px; font-weight: 400; color: var(--text-light); }
.package-price { font-size: 14px; font-weight: 600; color: var(--accent2); margin: 4px 0; }

.key-input {
    font-family: 'Courier New', monospace !important;
    letter-spacing: 2px; font-size: 16px !important; text-align: center;
}

/* ==================== UPLOAD SECTION ==================== */
.upload-section {
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    text-align: center;
}

.upload-section h4 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 14px;
}

.upload-section p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.upload-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 8px;
}

/* ==================== PURCHASES ==================== */
.purchases-grid { display: grid; gap: 12px; max-width: 700px; margin: 0 auto; }
.purchase-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--card-bg); border-radius: var(--radius);
    padding: 16px; border: 1px solid var(--border);
    transition: var(--transition);
}
.purchase-card:hover { border-color: var(--accent); }
.pc-icon { font-size: 28px; color: var(--danger); flex-shrink: 0; }
.pc-info { flex: 1; }
.pc-info h3 { font-size: 14px; color: #fff; margin-bottom: 4px; }
.pc-info p { font-size: 12px; color: var(--text-light); }

/* ==================== LOADING ==================== */
.loading-spinner {
    text-align: center; padding: 40px 16px;
    font-size: 16px; color: var(--text-light);
}
.loading-spinner i { margin-right: 8px; }

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center; padding: 48px 16px;
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border);
}
.empty-state i { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: #fff; }
.empty-state p { color: var(--text-light); margin-bottom: 16px; font-size: 13px; }

/* ==================== ALERTS ==================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success { background: rgba(91,168,60,0.15); color: #7ddb54; border: 1px solid rgba(91,168,60,0.3); }
.alert-danger { background: rgba(200,76,76,0.15); color: #ff6b6b; border: 1px solid rgba(200,76,76,0.3); }
.alert-warning { background: rgba(241,196,15,0.15); color: #f1c40f; border: 1px solid rgba(241,196,15,0.3); }
.alert-info { background: rgba(102,192,244,0.15); color: var(--accent); border: 1px solid rgba(102,192,244,0.3); }

/* ==================== BADGE ==================== */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 8px; border-radius: 50px;
    font-size: 11px; font-weight: 600;
}
.badge-success { background: rgba(91,168,60,0.15); color: #7ddb54; }
.badge-warning { background: rgba(241,196,15,0.15); color: #f1c40f; }
.badge-info { background: rgba(102,192,244,0.15); color: var(--accent); }
.badge-danger { background: rgba(200,76,76,0.15); color: #ff6b6b; }
.badge-secondary { background: rgba(98,110,121,0.2); color: var(--text-light); }

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-light); }

/* ==================== FOOTER ==================== */
.footer {
    margin-top: auto;
    background: var(--dark);
    color: var(--text-muted);
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    border-top: 1px solid var(--primary-light);
}

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

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 2000; display: flex;
    align-items: center; justify-content: center; padding: 16px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 24px; max-width: 460px; width: 100%;
    max-height: 80vh; overflow-y: auto;
    border: 1px solid var(--border);
    animation: slideUp 0.2s ease;
}

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

.modal-close {
    float: right; cursor: pointer; font-size: 22px;
    color: var(--text-muted); background: none; border: none;
    transition: var(--transition);
}
.modal-close:hover { color: #fff; }
.modal-content h3 { color: #fff; margin-bottom: 16px; font-size: 16px; }

/* ==================== FORM ==================== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-control {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit;
    transition: var(--transition);
    background: var(--bg); color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(102,192,244,0.2); }
.form-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ==================== TOUR ==================== */
.tour-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.82); z-index: 3000;
    padding: 16px;
}

/* Spotlight highlight — creates a "cutout" effect in the dark overlay */
.tour-spotlight {
    display: none;
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.82),
                0 0 30px rgba(102, 192, 244, 0.3);
    z-index: 3001;
    pointer-events: none;
    animation: spotlightPulse 2s ease-in-out infinite;
}

@keyframes spotlightPulse {
    0%, 100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.82), 0 0 20px rgba(102, 192, 244, 0.2); }
    50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.82), 0 0 40px rgba(102, 192, 244, 0.4); }
}

/* Element being highlighted */
.tour-highlighted {
    position: relative;
    z-index: 3002;
    animation: highlightGlow 2s ease-in-out infinite;
}

@keyframes highlightGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}

/* Tour card positioned near the spotlight */
.tour-card-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3003;
    max-width: 420px;
    width: 100%;
}

.tour-card {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 28px 24px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 0 40px rgba(102,192,244,0.2);
}

.tour-card .tour-icon {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 12px;
}

.tour-card h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
}

.tour-card p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.tour-card .tour-steps {
    text-align: left;
    margin-bottom: 16px;
}

.tour-card .tour-step-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
    color: var(--text);
}

.tour-card .tour-step-item:last-child { border-bottom: none; }

.tour-card .tour-step-item .step-num {
    background: var(--accent);
    color: var(--dark);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.tour-card .tour-nav {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.tour-card .tour-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}

.tour-card .tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.tour-card .tour-dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* Target label shown above the tour card when spotlight is active */
.tour-target-label {
    display: inline-block;
    background: var(--accent);
    color: var(--dark);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}


/* ==================== PAGE HEADER ==================== */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 20px; color: #fff; }
@media (min-width: 768px) { .page-header h1 { font-size: 24px; } }
.page-header p { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ==================== RESPONSIVE UTILITIES ==================== */
@media (max-width: 480px) {
    .hidden-mobile { display: none !important; }
}

/* Fix for images inside product cards */
.product-image { margin-bottom: 10px; }
.product-image img { width: 100%; height: auto; border-radius: var(--radius-sm); }

/* Scrollable container for purchases on mobile */
.purchases-grid { width: 100%; }

/* ==================== DOWNLOAD QUIZ PAGE ==================== */
.download-quiz-page { padding-bottom: 40px; }

.download-quiz-form input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.download-quiz-progress {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dq-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.dq-step.dq-active {
    opacity: 1;
    background: rgba(102,192,244,0.08);
    border: 1px solid rgba(102,192,244,0.2);
}

.dq-step.dq-done {
    opacity: 1;
    background: rgba(91,168,60,0.08);
    border: 1px solid rgba(91,168,60,0.2);
}

.dq-step.dq-error {
    opacity: 1;
    background: rgba(200,76,76,0.08);
    border: 1px solid rgba(200,76,76,0.2);
}

.dq-step-icon {
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.dq-active .dq-step-icon {
    border-color: var(--accent);
    color: var(--accent);
    animation: dqPulse 1.5s ease-in-out infinite;
}

.dq-done .dq-step-icon {
    border-color: var(--success);
    color: var(--success);
}

.dq-error .dq-step-icon {
    border-color: var(--danger);
    color: var(--danger);
}

@keyframes dqPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102,192,244,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(102,192,244,0); }
}

.dq-step-info {
    flex: 1;
}

.dq-step-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.dq-step-desc {
    font-size: 12px;
    color: var(--text-light);
}

.download-quiz-result h3 {
    font-size: 1.3rem;
}

/* ==================== DEVICE FINGERPRINT / BAN ==================== */
.fingerprint-detail {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    word-break: break-all;
    max-height: 100px;
    overflow-y: auto;
    background: var(--bg);
    padding: 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.ban-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ban-badge.banned { background: var(--danger); color: #fff; }
.ban-badge.active { background: var(--success); color: #fff; }
