/* ============================================================================
   Subscribe page — matches BG Gaming dark forest theme (style.css variables)
   ============================================================================ */

.subscribe-page {
    background:
        linear-gradient(180deg, #0d0800 0%, #0a0a0a 40%, #0a0a0a 100%);
    color: var(--text);
    min-height: 100vh;
    font-family: var(--font-body);
    position: relative;
    overflow-x: hidden;
}
/* Warm atmospheric glow — matches main site hero */
.subscribe-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at center top, rgba(212, 145, 30, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 100, 0, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 80%, rgba(255, 160, 0, 0.04) 0%, transparent 40%);
}
/* Keep page content above the glow layer */
.subscribe-page > * { position: relative; z-index: 1; }

/* ─── Header ──────────────────────────────────────────────────────────── */
.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: rgba(10, 10, 15, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}
.sub-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
}
.sub-logo img { width: 32px; height: 32px; }
.sub-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
.sub-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}
.sub-nav a:hover { color: var(--accent); }
/* When a nav link is a button, keep the button's own colors */
.sub-nav a.btn-primary {
    color: #1a1208;
}
.sub-nav a.btn-primary:hover {
    color: #1a1208;
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.sub-main { max-width: 1300px; margin: 0 auto; padding: 40px 32px 80px; }
.sub-hero {
    text-align: center;
    padding: 40px 0 24px;
}
.sub-hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
    letter-spacing: 1px;
}
.sub-sub {
    color: var(--text-dim);
    font-size: 16px;
    max-width: 640px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* ─── Currency toggle ─────────────────────────────────────────────────── */
.currency-choice {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.currency-label {
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.2px;
}
.currency-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 5px;
    gap: 4px;
}
.flag-icon {
    width: 20px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
    border-radius: 2px;
    object-fit: cover;
}
.currency-toggle button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 12px 28px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.15s;
}
.currency-toggle button.active {
    background: var(--accent);
    color: #1a1208;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.currency-toggle button:not(.active):hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* ─── My Subscription panel ───────────────────────────────────────────── */
.my-sub-panel {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 32px;
}
.my-sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.my-sub-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.my-sub-tier { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.my-sub-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--accent);
    color: #1a1208;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.my-sub-title, #my-sub-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.my-sub-status {
    color: var(--text-dim);
    font-size: 14px;
    text-align: right;
    line-height: 1.5;
}
.my-sub-status strong { color: var(--text); font-weight: 600; }
.my-sub-note {
    margin: 14px 0 0;
    padding: 12px 16px;
    background: rgba(212, 145, 30, 0.08);
    border: 1px solid rgba(212, 145, 30, 0.2);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
.my-sub-note:empty { display: none; }
.my-sub-note.warn {
    background: rgba(255, 68, 68, 0.08);
    border-color: rgba(255, 68, 68, 0.25);
}
.my-sub-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.my-sub-actions .btn { min-height: 44px; }
.my-sub-footer {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
}
.my-sub-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.my-sub-footer a:hover { color: var(--accent-light); }

/* Confirmation modal slight tweak */
.confirm-modal .modal-icon { font-size: 36px; }
.confirm-modal .modal-actions { margin-top: 18px; }

/* ─── Banners (login / EOS not linked) ────────────────────────────────── */
.sub-banner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.sub-banner strong { color: var(--accent); }
.sub-banner .btn { margin-left: auto; }
.login-banner { border-color: var(--accent); background: rgba(212, 145, 30, 0.06); }
.warn-banner  { border-color: var(--yellow); background: rgba(255, 170, 0, 0.06); }
.sub-banner code {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: 'Consolas', monospace;
    color: var(--accent-light);
}

/* ─── Layout (2-col: products + cart) ─────────────────────────────────── */
.sub-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 960px) {
    .sub-layout { grid-template-columns: 1fr; }
}

.sub-group-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.sub-group-title:first-child { margin-top: 0; }

/* ─── Product grid + cards ────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.product-grid.tight {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}
.product-card.highlight {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow), 0 8px 24px rgba(212, 145, 30, 0.1);
}
.product-card.highlight::before {
    content: 'PREMIUM';
    position: absolute;
    top: 12px; right: 12px;
    background: var(--accent);
    color: #1a1208;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 4px 10px;
    border-radius: 4px;
}
.product-card.best-value::after {
    content: 'BEST VALUE';
    position: absolute;
    top: 12px; right: 12px;
    background: var(--green);
    color: #002817;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 4px 10px;
    border-radius: 4px;
}

.product-image {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img { max-height: 80px; max-width: 80px; opacity: 0.9; }

.product-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.product-tagline {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}
.product-price {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin: 4px 0;
}
.product-price .interval {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 4px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-features li {
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}
.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--green);
    font-weight: 700;
}

.product-actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ─── Quantity controls for one-off items ─────────────────────────────── */
.qty-ctrl {
    display: inline-flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.qty-ctrl button {
    background: transparent;
    border: none;
    color: var(--text);
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
}
.qty-ctrl button:hover:not(:disabled) { background: var(--bg-card-hover); color: var(--accent); }
.qty-ctrl button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-ctrl .qty-value {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
}
.btn:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--accent-dim);
}
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1208;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-light);
    border-color: var(--accent-light);
}
.btn-large { padding: 14px 24px; font-size: 16px; width: 100%; }
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}
.btn-selected {
    background: var(--green);
    border-color: var(--green);
    color: #002817;
}

/* ─── Cart sidebar ────────────────────────────────────────────────────── */
.sub-cart {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.sub-cart h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin: 0 0 16px;
    color: var(--text);
    letter-spacing: 1px;
}
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    min-height: 60px;
}
.cart-empty { color: var(--text-muted); font-size: 14px; text-align: center; margin: 20px 0; }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    gap: 10px;
}
.cart-item-name { font-size: 13px; font-weight: 500; color: var(--text); }
.cart-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cart-item-amt { font-size: 13px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}
.cart-item-remove:hover { color: var(--red); }
.cart-totals {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-bottom: 16px;
    font-size: 14px;
}
.cart-total-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}
.cart-total-line.today { font-weight: 700; color: var(--text); font-size: 16px; }
.cart-total-line.monthly { color: var(--text-dim); }
.cart-secure {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.cart-secure svg { width: 14px; height: 14px; opacity: 0.7; }
.cart-footer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 12px 0 0;
}
.cart-footer a { color: var(--text-dim); text-decoration: underline; }
.cart-footer a:hover { color: var(--accent); }

/* ─── Auth area in header ─────────────────────────────────────────────── */
.auth-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
}
.auth-user img {
    width: 26px; height: 26px;
    border-radius: 50%;
}
.auth-user span { font-size: 13px; color: var(--text); }
.auth-user a.logout { color: var(--text-muted); font-size: 11px; margin-left: 4px; }
.auth-user a.logout:hover { color: var(--red); }

/* ─── Pricing notice ──────────────────────────────────────────────────── */
.pricing-notice {
    max-width: 900px;
    margin: 48px auto 0;
    padding: 28px 32px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.65;
}
.pricing-notice h3 {
    color: var(--text);
    font-size: 16px;
    margin: 0 0 14px;
    font-weight: 600;
}
.pricing-notice p { margin: 0 0 12px; }
.pricing-notice p:last-child { margin-bottom: 0; }
.pricing-notice strong { color: var(--text); }
.pricing-notice a { color: var(--accent); text-decoration: none; }
.pricing-notice a:hover { text-decoration: underline; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.sub-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
}
.sub-footer a { color: var(--text-dim); text-decoration: none; }
.sub-footer a:hover { color: var(--accent); }

/* ─── Modal ───────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease-out;
}
/* HTML `hidden` attribute needs to override display:flex */
.modal-backdrop[hidden] {
    display: none !important;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent-glow);
    animation: slideInModal 0.2s ease-out;
}
@keyframes slideInModal { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { color: var(--red); background: rgba(255, 68, 68, 0.1); }
.modal-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 8px;
}
.modal h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--accent);
    margin: 0 0 12px;
    text-align: center;
}
.modal p {
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 16px;
}
.modal-steps {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 16px 16px 40px;
    margin: 0 0 24px;
    color: var(--text);
    line-height: 1.9;
}
.modal-steps li { margin-bottom: 4px; }
.modal-steps code {
    background: rgba(212, 145, 30, 0.1);
    color: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.modal-actions .btn { flex: 1; }
.modal-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}
.modal-note a { color: var(--text-dim); }
.modal-note a:hover { color: var(--accent); }

/* ─── Toasts / error boxes ────────────────────────────────────────────── */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--red);
    color: var(--text);
    padding: 14px 18px;
    border-radius: 8px;
    max-width: 360px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.2s ease-out;
}
.toast.success { border-color: var(--green); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
