/* GoldStar theme v2 — readable version (owner feedback 2026-11-27: bright background made text hard to read).
   Soft blue-grey page, light-cyan panels with a white frame and dark-ink text, dark-blue header strips with
   white text, gold-orange buttons with dark text. Every text colour here is chosen for WCAG AA (>= 4.5:1). */
:root {
    --gs-page-1: #bcdcf0;
    --gs-page-2: #d2e6f2;
    --gs-panel-1: #e6f3fb;
    --gs-panel-2: #d6ebf7;
    --gs-inner: #f2f8fc;
    --gs-ink: #0d3256;        /* 11:1 on panel */
    --gs-muted: #33587a;      /* 6.3:1 on panel */
    --gs-strip: #1565a8;      /* white text 6.1:1 */
    --gs-strip-2: #11588f;
    --gs-gold: #f5a623;
    --gs-gold-2: #f08c00;
    --gs-gold-ink: #3a2400;   /* on gold buttons 8:1 */
    --gs-gold-text: #8a4f00;  /* gold-ish text on light panels 5.7:1 */
    --gs-red-text: #b42318;
    --gs-green-text: #0f6e3a;
    --text-primary: var(--gs-ink);
    --text-secondary: var(--gs-muted);
    --text-muted: var(--gs-muted);
    --border-color: rgba(13, 50, 86, 0.15);
    --bg-dark: var(--gs-page-2);
    --bg-card: var(--gs-panel-2);
    --accent-color: var(--gs-strip);
    --nav-accent-color: var(--gs-strip);
    --card-bg-start: var(--gs-panel-1);
    --card-bg-end: var(--gs-panel-2);
    --primary-gradient: linear-gradient(135deg, #ffc83d 0%, #f5a000 100%);
}

/* ---------- page ---------- */
html body { background: linear-gradient(180deg, var(--gs-page-1) 0%, var(--gs-page-2) 45%, #d9e9f3 100%) fixed !important; color: var(--gs-ink) !important; }
#page-loader { background: var(--gs-page-2) !important; }
.loader-text { color: var(--gs-strip) !important; }
.hero-overlay-gradient { background: linear-gradient(180deg, rgba(188, 220, 240, 0) 0%, rgba(188, 220, 240, 0.1) 50%, rgba(210, 230, 242, 0.9) 88%, var(--gs-page-2) 100%) !important; }

/* text that sits straight on the page background */
#main-content h1, #main-content h2, #main-content h3, .page-title, .section-title, .page-header h1, .page-header p {
    color: var(--gs-ink) !important; text-shadow: none !important;
}

/* ---------- navbar (dark-blue strip) ---------- */
html body .navbar, html body .navbar.scrolled { background: var(--gs-strip) !important; border-bottom: 3px solid var(--gs-gold) !important; box-shadow: 0 4px 14px rgba(13, 50, 86, 0.25) !important; }
html body .navbar .nav-custom-link, html body .navbar .nav-link { color: #ffffff !important; }
html body .navbar .nav-custom-link i, html body .navbar .nav-link i { color: #d9ecfa !important; }
html body .navbar .nav-custom-link.active, html body .navbar .nav-custom-link:hover { color: #ffffff !important; background: var(--gs-strip-2) !important; border-radius: 8px; }
html body .navbar .nav-custom-link.active i, html body .navbar .nav-custom-link:hover i { color: var(--gs-gold) !important; }
html body .navbar .nav-custom-link::after { background: var(--gs-gold) !important; }
html body .navbar-collapse, html body .navbar-expand-lg .navbar-collapse.show { background: var(--gs-strip) !important; }
html body .navbar-toggler, html body .navbar-toggler i { color: #fff !important; }

/* ---------- panels (light cyan + white frame) ---------- */
:is(.sidebar-card, .product-card, .feature-card-new, .server-info-card, .history-container .card, .detail-modal-v2,
    .purchase-modal-v2, .login-modal-v5, .register-modal-v5, .unified-modal, .modal, .nav-dropdown, .dropdown-body,
    .no-products, .loading-spinner, .topup-main-card, .payment-option-card, .bank-card, .tw-card, .rules-card, .promo-card,
    .promo-empty-state, .monthly-list-container, .podium-base, .download-card, .download-list-item, .fe-confirm-content,
    .shop-header-banner, .guide-card, .guide-container .card, .gift-card, .gift-container .card, .card, .ranking-row,
    .home-slider, .history-card, .profile-card, .wallet-card, .rf-modal, .refund-modal) {
    background: linear-gradient(165deg, var(--gs-panel-1) 0%, var(--gs-panel-2) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 8px 24px rgba(13, 50, 86, 0.14) !important;
    color: var(--gs-ink) !important;
}
.ranking-row:hover, .download-list-item:hover, .download-card:hover, .payment-option-card:hover, .product-card:hover {
    background: linear-gradient(165deg, #f0f8fd 0%, #dff0fa 100%) !important;
}
.sinfo-image::after, .dm-image-wrapper::before, .shop-header-banner::before, .shop-header-banner:not(.theme-rp)::before { background: transparent !important; }
.sinfo-image::after { background: linear-gradient(90deg, transparent 60%, var(--gs-panel-1) 100%) !important; }

/* every text inside a panel = dark ink (buttons, badges and strips keep their own colours below) */
:is(.sidebar-card, .product-card, .feature-card-new, .server-info-card, .history-container, .detail-modal-v2, .purchase-modal-v2,
    .login-modal-v5, .register-modal-v5, .unified-modal, .modal, .nav-dropdown, .dropdown-body, .no-products, .loading-spinner,
    .topup-main-card, .payment-option-card, .bank-card, .tw-card, .rules-card, .promo-card, .promo-empty-state,
    .monthly-list-container, .podium, .podium-base, .download-card, .download-list-item, .fe-confirm-content, .shop-header-banner,
    .guide-card, .guide-container, .gift-container, .card, .ranking-row, .history-card, .profile-card, .wallet-card,
    .shop-warning-bar, .rf-modal, .refund-modal, .bank-page_section, .tw-page_section, .download-container, .rules-container,
    .promotions-container, .ranking-container)
    :not(button):not(.btn):not([class*="btn"]):not([class*="badge"]):not([class*="pill"]):not(input):not(textarea):not(select):not(option)
    :not([class*="btn"] *):not([class*="badge"] *):not(button *):not([class*="strip"] *):not(.sidebar-header *):not(.pm-header-bg *)
    :not(.um-header):not(.um-header *):not(.rules-header *):not(.ranking-header *):not(.modal-header *):not(.card-header *):not(thead *) {
    color: var(--gs-ink) !important;
    text-shadow: none !important;
}
/* secondary text */
:is(.sidebar-card, .product-card, .feature-card-new, .server-info-card, .history-container, .detail-modal-v2, .purchase-modal-v2,
    .login-modal-v5, .register-modal-v5, .unified-modal, .modal, .topup-main-card, .payment-option-card, .bank-card, .tw-card,
    .rules-card, .promo-card, .monthly-list-container, .download-card, .download-list-item, .shop-header-banner, .card, .no-products,
    .bank-page_section, .tw-page_section, .guide-container, .rules-container, .promotions-container, .ranking-container)
    :is([class*="desc"], [class*="subtitle"], [class*="muted"], [class*="hint"], [class*="help"], [class*="note"], small, .text-secondary, [class*="-sub"], [class*="date"], [class*="time"]):not([class*="btn"]):not([class*="badge"]):not([class*="-header"] *) {
    color: var(--gs-muted) !important;
}
/* icons inside panels: sky-deep (3:1+ for non-text) */
:is(.sidebar-card, .product-card, .feature-card-new, .server-info-card, .history-container, .detail-modal-v2, .purchase-modal-v2,
    .login-modal-v5, .register-modal-v5, .unified-modal, .modal, .topup-main-card, .payment-option-card, .bank-card, .tw-card,
    .rules-card, .promo-card, .monthly-list-container, .download-card, .download-list-item, .shop-header-banner, .card, .no-products,
    .nav-dropdown, .guide-container, .rules-container, .ranking-container) i:not([class*="btn"] i):not(button i):not([class*="badge"] i):not(.sidebar-header i) {
    color: var(--gs-strip) !important;
}
/* prices / points / gold numbers: dark gold, readable on light */
:is(.dm-price, .pm-value, .pm-stacked-price .amount, .product-price, .price, [class*="price"], [class*="point-value"], #promo-server-name, .text-primary-blue, #user-point, #user-rp, .wallet-amount, .podium-amount, [class*="amount"]):not([class*="btn"]):not(button) {
    color: var(--gs-gold-text) !important;
}
.text-danger, [class*="warning-item"] span, .error-text, [class*="error"]:not([class*="btn"]) { color: var(--gs-red-text) !important; }
.text-success, [class*="success-text"] { color: var(--gs-green-text) !important; }

/* inner boxes that were dark/glass on dark panels */
:is(.um-body, .um-info, .um-input, .pm-input, .lm5-input, .rm5-input, .qty-input-v2, .tw-input, .pp-amount-input, .search-box input,
    .bank-acc-detail-box, .slip-upload-area, .bank-how-to, .tw-how-to, .rf-countdown-box, .dm-extra-info, .sinfo-features li,
    .stat-card, .rule-item, .category-icon, .header-icon-circle, .d-list-icon, .d-card-icon, .dm-badge, .meta-badge-item,
    .product-info-pill, .dropdown-header, .dm-image-section, .pm-product-image, .rank-avatar, .table th, .th-cell, .table-responsive tr,
    .action-btn-custom, .category-item:hover, .dropdown-option:hover, .history-tabs .btn-tab:not(.active), .banner-tab:not(.active)) {
    background: var(--gs-inner) !important;
    border-color: rgba(13, 50, 86, 0.14) !important;
    color: var(--gs-ink) !important;
}
.product-info-pill.rp, .product-info-pill.point { border-color: rgba(138, 79, 0, 0.45) !important; }
.product-info-pill, .product-info-pill i { color: var(--gs-gold-text) !important; }
.category-item.active { background: #ffffff !important; border: 2px solid var(--gs-strip) !important; }
.category-item.active .category-icon { background: var(--gs-strip) !important; }
.category-item.active .category-icon i { color: #fff !important; }
.history-tabs .btn-tab:not(.active), .banner-tab:not(.active) { color: var(--gs-ink) !important; }

/* inputs */
html body :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
    background: #f7fbfe !important;
    color: var(--gs-ink) !important;
    border: 1px solid rgba(13, 50, 86, 0.28) !important;
}
html body :is(input, textarea)::placeholder { color: #4b6c8c !important; opacity: 1 !important; }
html body :is(input, textarea, select):focus { border-color: var(--gs-strip) !important; box-shadow: 0 0 0 3px rgba(21, 101, 168, 0.2) !important; outline: none !important; }
.lm5-input-icon i, .rm5-input-icon i, .lm5-password-toggle i { color: var(--gs-strip) !important; }

/* ---------- strips (dark-blue header bars, white text) ---------- */
:is(.sidebar-card .sidebar-header, .pm-header-bg, .um-header, .modal-header, .history-container .card-header, .table thead, .dropdown-header-strip, .rules-header, .ranking-header) {
    background: var(--gs-strip) !important;
    color: #fff !important;
}
:is(.sidebar-card .sidebar-header, .pm-header-bg, .um-header, .modal-header, .history-container .card-header, .table thead) :is(*, i) { color: #fff !important; }
.table thead th { background: var(--gs-strip) !important; color: #fff !important; }
.table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.55) !important; }
.table td { color: var(--gs-ink) !important; border-color: rgba(13, 50, 86, 0.12) !important; }

/* ---------- buttons ---------- */
html body :is(.nav-btn-login, .lm5-submit-btn, .rm5-submit-btn, .btn-buy-v2, .dm-btn-buy, .pm-btn-confirm, .btn-primary, .swal2-confirm,
    .fcard-btn, .btn-topup, .btn-submit, [class*="btn-confirm"], .history-tabs .btn-tab.active, .banner-tab.active, .dropdown-option.active) {
    background: linear-gradient(135deg, #ffc83d 0%, #f5a000 100%) !important;
    color: var(--gs-gold-ink) !important;
    border: 1px solid #d98a00 !important;
    box-shadow: 0 4px 12px rgba(240, 140, 0, 0.3) !important;
    text-shadow: none !important;
}
html body :is(.nav-btn-login, .lm5-submit-btn, .rm5-submit-btn, .btn-buy-v2, .dm-btn-buy, .pm-btn-confirm, .btn-primary, .swal2-confirm, .fcard-btn, .btn-topup, .btn-submit, [class*="btn-confirm"]) :is(*, i) { color: var(--gs-gold-ink) !important; }
/* secondary buttons: white with blue text */
html body :is(.btn-gift-v2, .dm-btn-gift, .dm-btn-close, .pm-btn-cancel, .fe-btn-cancel, .btn-view, .btn-provider, .btn-download-secondary,
    .btn-pp-back-wizard, .swal2-cancel, .btn-secondary, .qty-btn, .m-action-btn, .lm5-close, .rm5-close, .pm-close, .um-close, .slider-btn, .btn-presale-info) {
    background: #ffffff !important;
    color: var(--gs-strip) !important;
    border: 1px solid rgba(21, 101, 168, 0.45) !important;
}
html body :is(.btn-gift-v2, .dm-btn-gift, .dm-btn-close, .pm-btn-cancel, .fe-btn-cancel, .btn-view, .btn-provider, .btn-download-secondary, .btn-secondary, .qty-btn, .m-action-btn, .lm5-close, .rm5-close, .pm-close, .um-close, .slider-btn) :is(*, i) { color: var(--gs-strip) !important; }
/* disabled: still readable (grey-blue on light, 4.6:1) */
html body :is(button, .btn, [class*="btn"]):is(:disabled, .disabled, [disabled]) {
    background: #c9d9e6 !important;
    color: #2f4d68 !important;
    border-color: #a9c0d3 !important;
    opacity: 1 !important;
    box-shadow: none !important;
}
html body :is(button, .btn, [class*="btn"]):is(:disabled, .disabled, [disabled]) :is(*, i) { color: #2f4d68 !important; }

/* badges: solid colour + white/dark text */
html body [class*="badge"] { text-shadow: none !important; }
html body :is(.badge-success, .bg-success, .status-success, .badge.success) { background: #0f7a3d !important; color: #fff !important; }
html body :is(.badge-danger, .bg-danger, .status-failed, .badge.failed, .badge.danger) { background: #b42318 !important; color: #fff !important; }
html body :is(.badge-warning, .bg-warning, .status-pending, .badge.pending, .badge.warning) { background: #f5a623 !important; color: var(--gs-gold-ink) !important; }
html body :is(.badge-info, .bg-info, .badge-primary, .bg-primary) { background: var(--gs-strip) !important; color: #fff !important; }
html body .coming-soon-badge, html body .promo-badge { background: var(--gs-strip) !important; color: #fff !important; }

/* ---------- modals / alerts ---------- */
.modal-overlay, .swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { background: rgba(13, 50, 86, 0.55) !important; }
html body .swal2-popup, body.swal2-shown .swal2-container .swal2-popup.swal2-dynamic-popup { background: linear-gradient(165deg, var(--gs-panel-1), var(--gs-panel-2)) !important; border: 2px solid #fff !important; }
html body .swal2-popup :is(.swal2-title, .swal2-html-container, .swal2-content, p, span, div, td, th) { color: var(--gs-ink) !important; }
.lm5-avatar-ring, .rm5-avatar-ring { background: #ffffff !important; border: 2px solid var(--gs-strip) !important; }
.lm5-divider::before, .lm5-divider::after { background: rgba(13, 50, 86, 0.2) !important; }

/* ---------- toast ---------- */
html body .toast { background: #ffffff !important; border: 2px solid var(--gs-strip) !important; }
html body .toast :is(.toast-title, .toast-message, *) { color: var(--gs-ink) !important; }

/* ---------- footer (dark-blue strip) ---------- */
html body .site-footer { background: var(--gs-strip-2) !important; border-top: 3px solid var(--gs-gold) !important; }
html body .site-footer :is(*, a, i) { color: #ffffff !important; }
html body .site-footer :is(.footer-disclaimer, .footer-credit, .footer-credit a, small) { color: #e3f0fa !important; }

/* scrollbar */
::-webkit-scrollbar-track { background: var(--gs-page-2) !important; }
::-webkit-scrollbar-thumb { background: #7fa9c9 !important; }

/* ---------- fixes from the contrast audit ---------- */
html body :is(.rules-header, .ranking-header, .download-header, .promotions-header, .guide-header) {
    background: var(--gs-strip) !important; border: 2px solid #fff !important; border-radius: 16px;
}
html body :is(.rules-header, .ranking-header, .download-header, .promotions-header, .guide-header) :is(*, i, p, h1, h2, span) {
    color: #ffffff !important; -webkit-text-fill-color: #ffffff !important;
}
html body :is(.download-group-title, .download-group-title span, .text-muted, #gift-loading p) { color: var(--gs-muted) !important; }
html body .download-group-title { color: var(--gs-ink) !important; border-left-color: var(--gs-gold) !important; }
html body :is(.podium-name, [id^="p-name"]) { color: var(--gs-ink) !important; -webkit-text-fill-color: var(--gs-ink) !important; background: none !important; }
html body .podium-rank-1 .podium-name { color: var(--gs-gold-text) !important; -webkit-text-fill-color: var(--gs-gold-text) !important; }
html body.swal2-shown .swal2-container .swal2-popup :is(.swal2-title, .swal2-html-container, .swal2-content, p, span, div, td, th, b, strong),
html body div:where(.swal2-container) :is(.swal2-title, .swal2-html-container) { color: var(--gs-ink) !important; -webkit-text-fill-color: var(--gs-ink) !important; }
html body.swal2-shown .swal2-container .swal2-actions button.swal2-dynamic-cancel { background: #fff !important; color: var(--gs-strip) !important; border: 1px solid rgba(21, 101, 168, 0.45) !important; }
/* any gradient-clipped headline text (white→gold fills) becomes solid ink on light */
html body #main-content :is(h1, h2, h3, .gradient-text, [class*="title"]):not([class*="btn"]):not(.rules-header *):not(.ranking-header *):not(.sidebar-header *) {
    -webkit-text-fill-color: currentColor !important;
}

html body .navbar .user-menu-btn { background: var(--gs-strip-2) !important; border: 1px solid rgba(255, 255, 255, 0.5) !important; }
html body .navbar .user-menu-btn :is(*, i, span) { color: #ffffff !important; }
html body .product-detail-link, html body .product-detail-link i { color: var(--gs-strip) !important; }
html body #main-content .text-white, html body #main-content .text-light { color: var(--gs-ink) !important; }
html body .product-detail-link { opacity: 1 !important; }
html body .um-header { background: var(--gs-strip) !important; }
html body .um-header :is(*, i, h2, p, div) { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
html body :is(.rules-header, .ranking-header, .guide-header, .um-header) .text-gradient-blue { background: none !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
html body .sidebar-conditions :is(p, span, li, div) { color: var(--gs-muted) !important; }
html body .guide-header { background: var(--gs-strip) !important; border: 2px solid #fff !important; border-radius: 16px; }
html body .guide-header :is(*, i) { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
html body .download-group-title span { color: var(--gs-muted) !important; }
/* id-level rules from the old theme */
html body #fe-confirm-title, html body #gift-name { color: var(--gs-ink) !important; -webkit-text-fill-color: var(--gs-ink) !important; }
html body #fe-confirm-message { color: var(--gs-muted) !important; }
html body :is(#btn-submit-slip-bank, #btn-submit-voucher) { background: linear-gradient(135deg, #ffc83d 0%, #f5a000 100%) !important; border: 1px solid #d98a00 !important; }
html body :is(#btn-submit-slip-bank, #btn-submit-voucher) :is(*, i) { color: var(--gs-gold-ink) !important; }
html body :is(#btn-submit-slip-bank, #btn-submit-voucher):disabled { background: #c9d9e6 !important; border-color: #a9c0d3 !important; }
html body :is(#btn-submit-slip-bank, #btn-submit-voucher):disabled :is(*, i) { color: #2f4d68 !important; }
html body :is(.lm5-title, .rm5-title) { color: var(--gs-ink) !important; -webkit-text-fill-color: var(--gs-ink) !important; background: none !important; }
html body :is(.lm5-subtitle, .rm5-subtitle, .lm5-help-text, .rm5-help-text) { color: var(--gs-muted) !important; }
html body .lm5-help-text b { color: var(--gs-ink) !important; }


/* promotions header sits on the page background */
html body .promo-header :is(h1, h2, .promo-title) { color: var(--gs-ink) !important; -webkit-text-fill-color: var(--gs-ink) !important; }
html body .promo-header :is(p, .promo-subtitle) { color: var(--gs-muted) !important; }


html body .download-group-title span[style*="opacity"] { opacity: 1 !important; color: var(--gs-muted) !important; }

html body :is(.rules-header, .ranking-header, .guide-header) :is(.rules-title, .ranking-title, .guide-title, h1) { background: none !important; }


/* hero wallpaper (Cobblemon scene, 2026-11-27): show Butterfree + Bulbasaur + Pikachu, fade only the last part */
html body .hero-bg-layer img {
    object-position: 50% 45% !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 93%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, #000 0%, #000 93%, transparent 100%) !important;
}
html body .hero-overlay-gradient {
    background: linear-gradient(180deg, rgba(21, 101, 168, 0.12) 0%, rgba(210, 230, 242, 0) 20%, rgba(210, 230, 242, 0) 92%, var(--gs-page-2) 100%) !important;
}

html body .hero-main-logo { max-width: 340px !important; }

@media (max-width: 767px) { html body .hero-main-logo { max-width: 230px !important; } }

