/* ═══════════════════════════════════════════════════════════════
   PixiuPBN Rollback — Luxury Dark Gold Theme
   Matching pixiupbn.com brand identity
   ═══════════════════════════════════════════════════════════════ */

:root {
    --ui-bg: #080808;
    --ui-bg-soft: #111111;
    --ui-surface: rgba(18, 18, 18, 0.82);
    --ui-surface-solid: #161616;
    --ui-text: #f5f0e0;
    --ui-text-muted: #b0a68a;
    --ui-border: rgba(212, 168, 83, 0.22);
    --ui-primary: #d4a853;
    --ui-primary-soft: #f0d68a;
    --ui-success: #d4a853;
    --ui-warning: #f5a524;
    --ui-danger: #ea5455;
    --ui-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    --gold: #d4a853;
    --gold-light: #f0d68a;
    --gold-dark: #b8923e;
    --gold-glow: rgba(212, 168, 83, 0.35);
}

[data-bs-theme="light"] {
    --ui-bg: #faf8f2;
    --ui-bg-soft: #f0ece0;
    --ui-surface: rgba(255, 255, 255, 0.82);
    --ui-surface-solid: #ffffff;
    --ui-text: #1a1408;
    --ui-text-muted: #6b5f45;
    --ui-border: rgba(180, 140, 50, 0.18);
    --ui-primary: #b8923e;
    --ui-primary-soft: #d4a853;
    --ui-shadow: 0 14px 32px rgba(30, 20, 0, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Segoe UI", sans-serif;
    color: var(--ui-text);
    background:
        radial-gradient(1200px 720px at -10% -18%, rgba(212, 168, 83, 0.12), transparent 50%),
        radial-gradient(900px 620px at 105% 0, rgba(212, 168, 83, 0.08), transparent 52%),
        linear-gradient(140deg, var(--ui-bg), var(--ui-bg-soft));
    min-height: 100vh;
    transition: background-color .25s ease, color .25s ease;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.main-navbar {
    background: color-mix(in srgb, var(--ui-surface) 90%, transparent) !important;
    border-bottom: 1px solid var(--ui-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform .25s ease, background-color .25s ease, border-color .25s ease;
    z-index: 1030;
}

.navbar-brand-text {
    letter-spacing: .04em;
    font-weight: 700;
}

.main-navbar .nav-link {
    color: var(--ui-text-muted);
    font-weight: 500;
    border-radius: 10px;
    transition: color .2s ease, background-color .2s ease;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus-visible,
.main-navbar .nav-link.active {
    color: var(--gold-light) !important;
    background: rgba(212, 168, 83, 0.08);
}

.main-navbar.navbar-scrolled {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* ── Brand Badge (PIXIUPBN pill) ─────────────────────────────── */
.navbar-brand .badge.bg-primary,
.badge.bg-primary.bg-gradient {
    background: linear-gradient(130deg, var(--gold), var(--gold-light)) !important;
    color: #0a0a0a !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    box-shadow: 0 4px 16px var(--gold-glow);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
    border: 0;
    background: linear-gradient(130deg, var(--gold), var(--gold-light)) !important;
    color: #0a0a0a !important;
    font-weight: 700;
    box-shadow: 0 10px 24px var(--gold-glow);
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #0a0a0a !important;
    box-shadow: 0 14px 32px rgba(212, 168, 83, 0.45);
}

.btn-outline-primary {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}

.btn-outline-primary:hover {
    background: rgba(212, 168, 83, 0.12) !important;
    border-color: var(--gold-light) !important;
    color: var(--gold-light) !important;
}

.btn-outline-light,
.btn-outline-secondary,
.btn-outline-danger {
    border-color: var(--ui-border);
    color: var(--ui-text);
}

.btn-outline-light:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    background: rgba(212, 168, 83, 0.08);
    border-color: var(--gold);
    color: var(--gold-light);
}

.btn-success {
    background: linear-gradient(130deg, var(--gold-dark), var(--gold)) !important;
    color: #0a0a0a !important;
    border: none;
    font-weight: 600;
}

/* ── Glass Cards ─────────────────────────────────────────────── */
.glass-card,
.card {
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
    border-radius: 18px;
    color: var(--ui-text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.glass-card:hover,
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 83, 0.45);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 20px var(--gold-glow);
}

.card-header {
    background: color-mix(in srgb, var(--ui-surface-solid) 75%, transparent);
    border-bottom: 1px solid var(--ui-border);
    color: var(--ui-text);
}

/* ── Section Wrap ─────────────────────────────────────────────── */
.section-wrap {
    position: relative;
    padding: 2.2rem;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(212, 168, 83, 0.04), rgba(212, 168, 83, 0.01));
    border: 1px solid var(--ui-border);
    overflow: hidden;
}

.section-wrap > * {
    position: relative;
    z-index: 1;
}

.section-wrap::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    top: -120px;
    right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.15), transparent 70%);
    pointer-events: none;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
}

.gradient-text {
    background: linear-gradient(130deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle,
.text-muted {
    color: var(--ui-text-muted) !important;
}

.section-title {
    background: linear-gradient(130deg, var(--ui-text), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Feature Cards ─────────────────────────────────────────────── */
.feature-card {
    height: 100%;
    padding: 1.2rem;
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(212, 168, 83, 0.24), rgba(212, 168, 83, 0.08)) !important;
    color: var(--gold-light) !important;
}

.feature-icon.bg-primary,
.feature-icon.bg-info,
.feature-icon.bg-success {
    background: linear-gradient(145deg, rgba(212, 168, 83, 0.24), rgba(212, 168, 83, 0.08)) !important;
    color: var(--gold-light) !important;
}

.feature-icon-small {
    background: rgba(212, 168, 83, 0.1) !important;
}

.feature-icon-small .text-primary {
    color: var(--gold) !important;
}

/* ── Override Bootstrap Primary Color ─────────────────────────── */
.text-primary {
    color: var(--gold) !important;
}

.bg-primary {
    background-color: var(--gold) !important;
}

.bg-primary.bg-gradient {
    background: linear-gradient(130deg, var(--gold), var(--gold-light)) !important;
}

.bg-primary.bg-opacity-10 {
    background: rgba(212, 168, 83, 0.1) !important;
}

.bg-info.bg-gradient {
    background: linear-gradient(130deg, var(--gold-dark), var(--gold)) !important;
}

.bg-success.bg-gradient {
    background: linear-gradient(130deg, #b8923e, #d4a853) !important;
}

.text-success {
    color: var(--gold) !important;
}

.text-info {
    color: var(--gold-light) !important;
}

/* ── Check marks (hero "why" card) ─────────────────────────────── */
.bi-check-circle-fill.text-success {
    color: var(--gold) !important;
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-control,
.form-select,
textarea.form-control {
    border-radius: 12px;
    border: 1px solid var(--ui-border);
    background: color-mix(in srgb, var(--ui-surface-solid) 66%, transparent);
    color: var(--ui-text);
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: color-mix(in srgb, var(--ui-text-muted) 72%, transparent);
}

.form-control:focus,
.form-select:focus {
    color: var(--ui-text);
    border-color: rgba(212, 168, 83, 0.56);
    box-shadow: 0 0 0 .22rem rgba(212, 168, 83, 0.18);
    background: color-mix(in srgb, var(--ui-surface-solid) 74%, transparent);
}

/* ── Tables ─────────────────────────────────────────────────────── */
.table,
.table th,
.table td,
.table-striped > tbody > tr:nth-of-type(odd) > * {
    color: var(--ui-text);
    border-color: var(--ui-border);
}

.table thead th {
    background: rgba(212, 168, 83, 0.08);
    color: var(--gold-light);
    border-bottom: 2px solid var(--ui-border);
}

/* ── Badges ─────────────────────────────────────────────────────── */
.badge.bg-dark {
    background: #1a1a1a !important;
    border: 1px solid var(--ui-border);
}

.badge.bg-success {
    background: linear-gradient(130deg, var(--gold-dark), var(--gold)) !important;
    color: #0a0a0a !important;
}

.badge.bg-warning {
    background: linear-gradient(130deg, #d4a853, #f0d68a) !important;
    color: #0a0a0a !important;
}

.badge.bg-info {
    background: rgba(212, 168, 83, 0.15) !important;
    color: var(--gold-light) !important;
}

/* ── Hover Effects ─────────────────────────────────────────────── */
.hover-effect:hover {
    color: var(--gold-light) !important;
}

.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: "";
    position: absolute;
    left: 20%;
    bottom: 4px;
    width: 60%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(130deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transition: transform .2s ease;
}

.hover-underline:hover::after {
    transform: scaleX(1);
}

/* ── Animations ─────────────────────────────────────────────────── */
.reveal-up {
    opacity: 1;
    transform: none;
}

.js-reveal .reveal-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .38s ease, transform .38s ease;
}

.js-reveal .reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

main {
    position: relative;
    z-index: 1;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.footer-modern {
    border-top: 1px solid var(--ui-border);
    background: color-mix(in srgb, var(--ui-surface) 78%, transparent);
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ui-text-muted);
    border: 1px solid var(--ui-border);
    transition: all .2s ease;
}

.social-link:hover {
    color: var(--gold-light);
    transform: translateY(-2px);
    border-color: var(--gold);
    background: rgba(212, 168, 83, 0.1);
    box-shadow: 0 4px 16px var(--gold-glow);
}

/* ── Modals ─────────────────────────────────────────────────────── */
.loader {
    opacity: 1;
    transition: opacity .35s ease;
}

.modal-backdrop {
    z-index: 1080;
}

.modal {
    z-index: 1090;
}

.modal-content {
    border: 1px solid var(--ui-border);
    background: var(--ui-surface-solid);
    color: var(--ui-text);
    border-radius: 18px;
}

.modal-header,
.modal-footer {
    border-color: var(--ui-border);
}

/* ── Admin Panel ─────────────────────────────────────────────── */
.admin-panel-card {
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    border-radius: 16px;
    box-shadow: var(--ui-shadow);
    overflow: hidden;
}

.admin-panel-card .card-header {
    background: color-mix(in srgb, var(--ui-surface-solid) 82%, transparent);
}

.admin-tools .form-select,
.admin-tools .form-control,
.admin-tools .btn {
    min-height: 42px;
}

/* ── Theme Transition ─────────────────────────────────────────── */
.theme-transitioning {
    opacity: .8;
}

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

/* ── Pagination & misc ─────────────────────────────────────── */
.page-link {
    background: var(--ui-surface);
    border-color: var(--ui-border);
    color: var(--ui-text);
}

.page-link:hover {
    background: rgba(212, 168, 83, 0.12);
    border-color: var(--gold);
    color: var(--gold-light);
}

.page-item.active .page-link {
    background: linear-gradient(130deg, var(--gold), var(--gold-light)) !important;
    border-color: var(--gold) !important;
    color: #0a0a0a !important;
}

/* ── Dropdown Menu ─────────────────────────────────────────────── */
.dropdown-menu {
    background: var(--ui-surface-solid);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.dropdown-item {
    color: var(--ui-text);
    transition: background .15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(212, 168, 83, 0.1);
    color: var(--gold-light);
}

.dropdown-item.active,
.dropdown-item:active {
    background: linear-gradient(130deg, var(--gold), var(--gold-light));
    color: #0a0a0a;
}

/* ── Navbar toggler (mobile) ─────────────────────────────────── */
.navbar-toggler {
    border-color: var(--ui-border);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 .22rem rgba(212, 168, 83, 0.2);
}

/* ── Scrollbar (webkit) ─────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ui-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.25);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 83, 0.4);
}

/* ── Alert overrides ─────────────────────────────────────────── */
.alert-success {
    background: rgba(212, 168, 83, 0.12);
    border-color: rgba(212, 168, 83, 0.25);
    color: var(--gold-light);
}

.alert-danger {
    background: rgba(234, 84, 85, 0.12);
    border-color: rgba(234, 84, 85, 0.25);
    color: #ff8a8b;
}

.alert-info {
    background: rgba(212, 168, 83, 0.08);
    border-color: rgba(212, 168, 83, 0.2);
    color: var(--gold-light);
}

/* ── Plans / Pricing Cards ─────────────────────────────────── */
.card.border-primary,
.glass-card.border-primary {
    border-color: var(--gold) !important;
    box-shadow: 0 0 24px var(--gold-glow);
}

/* ── Login/Signup Pages ─────────────────────────────────────── */
.btn-link {
    color: var(--gold);
}

.btn-link:hover {
    color: var(--gold-light);
}

a {
    color: var(--gold);
}

a:hover {
    color: var(--gold-light);
}

/* ── Gold Shimmer on Brand ─────────────────────────────────── */
@keyframes goldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.navbar-brand .badge {
    background-size: 200% 100%;
    animation: goldShimmer 4s ease-in-out infinite;
    background-image: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 40%, #fff 50%, var(--gold-light) 60%, var(--gold) 100%) !important;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
    .section-wrap {
        padding: 1.4rem;
        border-radius: 18px;
    }
    .main-navbar .navbar-nav {
        margin-top: .75rem;
        gap: .35rem;
    }
    .navbar-collapse {
        background: var(--ui-surface-solid);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 0.5rem;
        border: 1px solid var(--ui-border);
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.85rem;
    }
}

/* ── Selection Color ─────────────────────────────────────────── */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: var(--gold-light);
}
