/* GodWeb - Xianxia / Celestial Theme (Enhanced)
 * Deep Cultivation World aesthetic with ink wash painting,
 * celestial void, flowing qi, and ancient calligraphy.
 * --------------------------------------------------------------- */

:root {
    /* ─── Xianxia Palette ─── */
    --xianxia-ink: #080810;
    --xianxia-ink-deep: #040408;
    --xianxia-jade: #2dd4a0;
    --xianxia-jade-dark: #10b981;
    --xianxia-jade-glow: rgba(45, 212, 160, 0.4);
    --xianxia-gold: #fbbf24;
    --xianxia-gold-deep: #d4a017;
    --xianxia-gold-glow: rgba(251, 191, 36, 0.4);
    --xianxia-crimson: #b91c1c;
    --xianxia-cinnabar: #dc2626;
    --xianxia-cinnabar-glow: rgba(220, 38, 38, 0.3);
    --xianxia-blood: #7f1d1d;
    --xianxia-spirit: #a78bfa;
    --xianxia-spirit-glow: rgba(167, 139, 250, 0.3);
    --xianxia-spirit-deep: #7c3aed;
    --xianxia-neon-fire: #67e8f9;
    --xianxia-mist: rgba(255, 255, 255, 0.85);
    --xianxia-parchment: #12121e;
    --xianxia-parchment-light: #1a1a2e;

    /* ─── Override base style.css variables ─── */
    --primary-color: var(--xianxia-jade);
    --secondary-color: var(--xianxia-gold);
    --dark-color: var(--xianxia-ink);
    --light-color: #0d0d16;
    --text-color: #e8e4d9;
    --text-light: #9ca3af;
    --border-color: rgba(45, 212, 160, 0.12);
    --surface-color: var(--xianxia-parchment);
    --surface-muted: var(--xianxia-ink-deep);

    /* ─── Typography ─── */
    --font-display: "Cinzel Decorative", "Cinzel", "Ma Shan Zheng", serif;
    --font-body: "Noto Serif", "Source Serif 4", "Georgia", serif;

    /* ─── Gradients ─── */
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #2dd4a0 50%, #6ee7b7 100%);
    --gradient-gold: linear-gradient(135deg, #d4a017 0%, #fbbf24 60%, #fde68a 100%);
    --gradient-night: linear-gradient(140deg, #040408 0%, #080810 45%, #12121e 100%);
    --gradient-spirit: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c4b5fd 100%);
    --gradient-cinnabar: linear-gradient(135deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
}

/* ────────────────────────────────────────────────────────────────
 * Body & Background - Deep celestial void with qi nebulae
 * ──────────────────────────────────────────────────────────────── */

html, body {
    background: var(--gradient-night);
    color: var(--text-color);
}

body {
    background:
        radial-gradient(1200px 800px at 8% -15%, rgba(45, 212, 160, 0.10), transparent 55%),
        radial-gradient(1000px 700px at 92% 115%, rgba(251, 191, 36, 0.06), transparent 55%),
        radial-gradient(800px 600px at 50% 30%, rgba(167, 139, 250, 0.04), transparent 50%),
        radial-gradient(600px 400px at 75% 60%, rgba(220, 38, 38, 0.03), transparent 50%),
        var(--gradient-night);
    background-attachment: fixed;
    font-family: var(--font-body);
    cursor: url('../img/cursor-sword.svg') 4 4, auto;
}

/* ────────────────────────────────────────────────────────────────
 * Navbar - Deep void with jade energy border
 * ──────────────────────────────────────────────────────────────── */

.navbar {
    background: linear-gradient(180deg, rgba(4, 4, 8, 0.92) 0%, rgba(8, 8, 16, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(45, 212, 160, 0.2);
    box-shadow:
        0 0 30px rgba(45, 212, 160, 0.06),
        0 1px 0 rgba(251, 191, 36, 0.08);
}

.navbar a,
.navbar .btn-outline {
    color: var(--text-color) !important;
    transition: color 0.3s, text-shadow 0.3s, border-color 0.3s;
}

.navbar .btn-outline {
    border-color: rgba(232, 228, 217, 0.35) !important;
}

.navbar .btn-outline:hover {
    border-color: var(--xianxia-jade) !important;
}

.navbar a:hover {
    color: var(--xianxia-jade) !important;
    text-shadow: 0 0 12px rgba(45, 212, 160, 0.4);
}

/* ────────────────────────────────────────────────────────────────
 * Typography - Calligraphy headings with jade/gold gradient
 * ──────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: #e8e4d9;
    text-shadow: 0 2px 18px rgba(45, 212, 160, 0.12);
}

.section-title h2 {
    background: linear-gradient(120deg, #6ee7b7, #2dd4a0 40%, #fbbf24 80%, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

/* Ornamental line below section titles */
.section-title h2::after {
    content: "───── ☯ ─────";
    display: block;
    font-size: 0.45em;
    letter-spacing: 0.3em;
    margin-top: 12px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 160, 0.6), rgba(251, 191, 36, 0.6), transparent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ────────────────────────────────────────────────────────────────
 * Cards - Silk/parchment with talisman borders
 * ──────────────────────────────────────────────────────────────── */

.card,
.feature-card,
.post-card,
.product-card,
.dashboard-content {
    background: linear-gradient(160deg, rgba(18, 18, 30, 0.92), rgba(8, 8, 16, 0.96));
    border: 1px solid rgba(45, 212, 160, 0.10);
    border-radius: 16px;
    box-shadow:
        0 8px 32px -16px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(45, 212, 160, 0.06);
    backdrop-filter: blur(12px);
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s;
}

.card:hover,
.feature-card:hover,
.post-card:hover,
.product-card:hover {
    border-color: rgba(45, 212, 160, 0.30);
    box-shadow:
        0 12px 40px -16px rgba(0, 0, 0, 0.9),
        0 0 24px rgba(45, 212, 160, 0.08),
        0 0 48px rgba(167, 139, 250, 0.04),
        inset 0 1px 0 rgba(45, 212, 160, 0.12);
    transform: translateY(-4px);
}

/* Decorative corner rune on cards */
.card::after,
.feature-card::after,
.product-card::after {
    content: "◇";
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    color: rgba(45, 212, 160, 0.15);
    pointer-events: none;
    transition: color 0.4s, text-shadow 0.4s;
}

.card:hover::after,
.feature-card:hover::after,
.product-card:hover::after {
    color: rgba(45, 212, 160, 0.4);
    text-shadow: 0 0 8px rgba(45, 212, 160, 0.3);
}

/* ────────────────────────────────────────────────────────────────
 * Feature Icons - Cultivation element styling
 * ──────────────────────────────────────────────────────────────── */

.feature-icon {
    position: relative;
}

.feature-icon::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(45, 212, 160, 0.15);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.feature-card:hover .feature-icon::after {
    opacity: 1;
    animation: xxRunePulse 2s ease-in-out infinite;
}

@keyframes xxRunePulse {
    0%, 100% { border-color: rgba(45, 212, 160, 0.15); transform: scale(1); }
    50% { border-color: rgba(45, 212, 160, 0.4); transform: scale(1.05); }
}

/* ────────────────────────────────────────────────────────────────
 * Logo - Gold + jade aura glow with spirit energy
 * ──────────────────────────────────────────────────────────────── */

.xx-logo {
    filter:
        drop-shadow(0 0 8px rgba(251, 191, 36, 0.4))
        drop-shadow(0 0 16px rgba(45, 212, 160, 0.25))
        drop-shadow(0 0 28px rgba(167, 139, 250, 0.12));
}

.xx-logo:hover {
    filter:
        drop-shadow(0 0 18px rgba(251, 191, 36, 0.7))
        drop-shadow(0 0 30px rgba(45, 212, 160, 0.5))
        drop-shadow(0 0 40px rgba(167, 139, 250, 0.25));
}

/* ────────────────────────────────────────────────────────────────
 * Buttons - Jade/gold cultivation energy styling
 * ──────────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary {
    background: var(--gradient-primary);
    color: #040408 !important;
    font-weight: 700;
    border: none;
    text-shadow: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover,
.btn-secondary:hover {
    background: linear-gradient(135deg, #2dd4a0 0%, #6ee7b7 50%, #a7f3d0 100%);
    box-shadow:
        0 0 20px rgba(45, 212, 160, 0.4),
        0 0 40px rgba(45, 212, 160, 0.15);
}

.btn-outline {
    border: 1px solid rgba(45, 212, 160, 0.3);
    color: var(--xianxia-jade) !important;
    background: transparent;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: rgba(45, 212, 160, 0.1);
    border-color: rgba(45, 212, 160, 0.6);
    box-shadow: 0 0 16px rgba(45, 212, 160, 0.15);
}

/* Special bloom class for GodCoin topup button */
.xx-bloom {
    position: relative;
    animation: xxBloomPulse 2.8s ease-in-out infinite;
}

.xx-bloom::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: transparent;
    box-shadow:
        0 0 12px rgba(45, 212, 160, 0.4),
        0 0 24px rgba(251, 191, 36, 0.2),
        0 0 36px rgba(167, 139, 250, 0.1);
    opacity: 0.6;
    animation: xxBloomGlow 2.8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes xxBloomPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes xxBloomGlow {
    0%, 100% {
        box-shadow:
            0 0 12px rgba(45, 212, 160, 0.4),
            0 0 24px rgba(251, 191, 36, 0.2),
            0 0 36px rgba(167, 139, 250, 0.1);
        opacity: 0.6;
    }
    50% {
        box-shadow:
            0 0 20px rgba(45, 212, 160, 0.6),
            0 0 40px rgba(251, 191, 36, 0.35),
            0 0 60px rgba(167, 139, 250, 0.2);
        opacity: 1;
    }
}

/* ────────────────────────────────────────────────────────────────
 * Hero Section - Celestial void with qi radiance
 * ──────────────────────────────────────────────────────────────── */

.hero {
    background:
        radial-gradient(800px 500px at 30% 40%, rgba(45, 212, 160, 0.08), transparent 60%),
        radial-gradient(600px 400px at 70% 60%, rgba(251, 191, 36, 0.05), transparent 60%),
        radial-gradient(400px 300px at 50% 50%, rgba(167, 139, 250, 0.04), transparent 60%),
        var(--gradient-night);
    position: relative;
}

/* Subtle ornamental top border for hero */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(45, 212, 160, 0.3) 20%,
        rgba(251, 191, 36, 0.4) 50%,
        rgba(45, 212, 160, 0.3) 80%,
        transparent);
    pointer-events: none;
}

.hero h1,
.hero .hero-title {
    font-family: var(--font-display);
    background: linear-gradient(120deg, #6ee7b7, #2dd4a0 35%, #fbbf24 70%, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    letter-spacing: 0.04em;
}

.hero p,
.hero .hero-subtitle {
    color: var(--text-light);
}

/* ────────────────────────────────────────────────────────────────
 * Footer - Ancient realm boundary with jade mist
 * ──────────────────────────────────────────────────────────────── */

.footer {
    background: linear-gradient(180deg, var(--xianxia-ink-deep) 0%, #020204 100%);
    border-top: 1px solid rgba(45, 212, 160, 0.12);
    color: var(--text-light);
    position: relative;
}

.footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(251, 191, 36, 0.3) 30%,
        rgba(45, 212, 160, 0.3) 70%,
        transparent);
    pointer-events: none;
}

.footer h4 {
    color: var(--xianxia-jade);
    text-shadow: 0 0 12px rgba(45, 212, 160, 0.2);
    letter-spacing: 0.05em;
}

.footer a {
    color: var(--text-light);
    transition: color 0.3s, text-shadow 0.3s;
}

.footer a:hover {
    color: var(--xianxia-jade);
    text-shadow: 0 0 8px rgba(45, 212, 160, 0.2);
}

.footer-bottom {
    border-top: 1px solid rgba(45, 212, 160, 0.08);
}

/* ────────────────────────────────────────────────────────────────
 * Misc overrides - forms, alerts, dropdowns
 * ──────────────────────────────────────────────────────────────── */

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--xianxia-parchment);
    border: 1px solid rgba(45, 212, 160, 0.12);
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--xianxia-jade);
    box-shadow:
        0 0 12px rgba(45, 212, 160, 0.2),
        0 0 24px rgba(45, 212, 160, 0.06);
    outline: none;
}

.alert {
    background: var(--xianxia-parchment);
    border: 1px solid rgba(45, 212, 160, 0.2);
    color: var(--text-color);
    border-radius: 12px;
}

.dropdown-menu {
    background: rgba(18, 18, 30, 0.98);
    border: 1px solid rgba(45, 212, 160, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.7),
        0 0 16px rgba(45, 212, 160, 0.04);
    backdrop-filter: blur(16px);
}

.dropdown-menu a {
    color: var(--text-color);
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: rgba(45, 212, 160, 0.08);
    color: var(--xianxia-jade);
    padding-left: 24px;
}

/* Mobile menu */
.mobile-menu {
    background: rgba(4, 4, 8, 0.98);
    border-left: 1px solid rgba(45, 212, 160, 0.15);
    backdrop-filter: blur(20px);
}

.mobile-menu-header {
    border-bottom: 1px solid rgba(45, 212, 160, 0.12);
}

.mobile-menu-links a {
    color: var(--text-color);
    border-bottom: 1px solid rgba(45, 212, 160, 0.06);
    transition: all 0.3s;
}

.mobile-menu-links a:hover {
    color: var(--xianxia-jade);
    background: rgba(45, 212, 160, 0.05);
    text-shadow: 0 0 8px rgba(45, 212, 160, 0.2);
}

/* GodCoin balance - Linh Thạch (Spirit Stone) */
.godcoin-balance {
    color: var(--xianxia-gold);
    border-color: rgba(251, 191, 36, 0.25);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(167, 139, 250, 0.05));
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.godcoin-balance::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.15), transparent);
    transform: translateX(-100%);
    animation: xxCoinShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes xxCoinShimmer {
    0%, 70% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.godcoin-balance:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}

.godcoin-balance i {
    color: var(--xianxia-gold);
    animation: xxCoinPulse 2s ease-in-out infinite;
}

/* Notification styling */
.notification-badge {
    background: var(--xianxia-cinnabar);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

/* Site ticker */
.site-ticker {
    background: var(--xianxia-ink-deep);
    border-top: 1px solid rgba(45, 212, 160, 0.10);
    border-bottom: 1px solid rgba(45, 212, 160, 0.08);
}

.site-ticker-label {
    color: var(--xianxia-gold);
    border-right-color: rgba(45, 212, 160, 0.15);
}

.site-ticker-label i {
    color: var(--xianxia-gold);
}

.site-ticker-item {
    color: #e8e4d9;
}

.site-ticker-item i {
    color: var(--xianxia-jade);
}

.site-ticker-sep {
    color: rgba(232, 228, 217, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--xianxia-ink-deep);
}

::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 160, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 212, 160, 0.35);
}

/* Selection */
::selection {
    background: rgba(45, 212, 160, 0.25);
    color: #e8e4d9;
}

/* ────────────────────────────────────────────────────────────────
 * Premium/VIP content - Tiên Nhân / Pháp Bảo styling
 * ──────────────────────────────────────────────────────────────── */

.premium-badge {
    background: var(--gradient-gold);
    color: #1a0800 !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3), 0 0 24px rgba(251, 191, 36, 0.1);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: xxTalismanGlow 3s ease-in-out infinite;
    position: relative;
}

@keyframes xxTalismanGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.3), 0 0 16px rgba(251, 191, 36, 0.1); }
    50% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.5), 0 0 32px rgba(251, 191, 36, 0.2), 0 0 48px rgba(167, 139, 250, 0.1); }
}

/* VIP cards - "Linh khí bao quanh" aura (gold pulse) */
.card:has(.premium-badge),
.card.xx-vip-card {
    border: 1px solid rgba(251, 191, 36, 0.25);
    position: relative;
    overflow: visible;
}

.card:has(.premium-badge)::before,
.card.xx-vip-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(167, 139, 250, 0.12), rgba(251, 191, 36, 0.15));
    opacity: 0;
    animation: xxVipAuraPulse 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes xxVipAuraPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.6; }
}

.card:has(.premium-badge):hover,
.card.xx-vip-card:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1), 0 0 40px rgba(167, 139, 250, 0.05);
    transform: translateY(-3px);
}

.card:has(.premium-badge):hover::before,
.card.xx-vip-card:hover::before {
    opacity: 0.7;
    animation: none;
}

/* Decorative rune corner for VIP cards */
.card:has(.premium-badge)::after,
.card.xx-vip-card::after {
    content: "☯";
    color: rgba(251, 191, 36, 0.25);
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.15);
    font-size: 14px;
}

/* Card price with spirit stone styling */
.card-price {
    color: var(--xianxia-gold) !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.card-price i {
    color: var(--xianxia-gold) !important;
    animation: xxCoinPulse 2s ease-in-out infinite;
}

@keyframes xxCoinPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.3)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5)); }
}

/* ────────────────────────────────────────────────────────────────
 * Section dividers - cloud wave pattern
 * ──────────────────────────────────────────────────────────────── */

.section + .section::before {
    content: "";
    display: block;
    height: 1px;
    max-width: 400px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg,
        transparent,
        rgba(45, 212, 160, 0.2) 20%,
        rgba(251, 191, 36, 0.3) 50%,
        rgba(45, 212, 160, 0.2) 80%,
        transparent);
}

/* ────────────────────────────────────────────────────────────────
 * Custom cursor overrides for interactive elements
 * ──────────────────────────────────────────────────────────────── */

a, button, [role="button"], input, select, textarea, label[for],
.btn, .dropdown-toggle, .notification-toggle, .theme-toggle-btn,
.mobile-menu-btn, .filter-tag {
    cursor: pointer;
}

/* ────────────────────────────────────────────────────────────────
 * Stat cards - Cultivation realm stats
 * ──────────────────────────────────────────────────────────────── */

.stat-card {
    background: linear-gradient(160deg, rgba(18, 18, 30, 0.9), rgba(8, 8, 16, 0.95));
    border: 1px solid rgba(45, 212, 160, 0.08);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--xianxia-jade), var(--xianxia-gold), var(--xianxia-spirit));
    opacity: 0.5;
}

/* ────────────────────────────────────────────────────────────────
 * Tables - Ancient scroll ledger style
 * ──────────────────────────────────────────────────────────────── */

.table,
table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(45, 212, 160, 0.08);
}

.table th,
table th {
    background: rgba(45, 212, 160, 0.06);
    border-color: rgba(45, 212, 160, 0.08);
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

.table tr:hover td,
table tr:hover td {
    background: rgba(45, 212, 160, 0.03);
}

/* ────────────────────────────────────────────────────────────────
 * Pagination - Celestial stepping stones
 * ──────────────────────────────────────────────────────────────── */

.pagination a,
.pagination span {
    border: 1px solid rgba(45, 212, 160, 0.12);
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: var(--xianxia-jade);
    box-shadow: 0 0 12px rgba(45, 212, 160, 0.15);
    color: var(--xianxia-jade);
}

.pagination .active,
.pagination .current {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #040408;
}

/* ────────────────────────────────────────────────────────────────
 * Filter tags - Ancient realm categories
 * ──────────────────────────────────────────────────────────────── */

.filter-tag,
.category-tag {
    border: 1px solid rgba(45, 212, 160, 0.15);
    transition: all 0.3s;
}

.filter-tag:hover,
.category-tag:hover,
.filter-tag.active,
.category-tag.active {
    background: rgba(45, 212, 160, 0.1);
    border-color: var(--xianxia-jade);
    color: var(--xianxia-jade);
    box-shadow: 0 0 8px rgba(45, 212, 160, 0.15);
}

/* ────────────────────────────────────────────────────────────────
 * Comments section - Ancient scroll annotations
 * ──────────────────────────────────────────────────────────────── */

.comment,
.comments-section {
    border: 1px solid rgba(45, 212, 160, 0.08);
    border-radius: 12px;
}

.comment {
    border-left: 3px solid rgba(45, 212, 160, 0.2);
}

/* ────────────────────────────────────────────────────────────────
 * Page header - Realm entrance banner
 * ──────────────────────────────────────────────────────────────── */

.page-header {
    position: relative;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(45, 212, 160, 0.2) 30%,
        rgba(251, 191, 36, 0.3) 50%,
        rgba(45, 212, 160, 0.2) 70%,
        transparent);
}

/* ────────────────────────────────────────────────────────────────
 * Home CTA - Celestial void call-to-action
 * ──────────────────────────────────────────────────────────────── */

.home-cta {
    background: linear-gradient(180deg, rgba(18, 18, 30, 0.85) 0%, rgba(4, 4, 8, 0.95) 100%);
    border-top: 1px solid rgba(45, 212, 160, 0.12);
    border-bottom: 1px solid rgba(251, 191, 36, 0.08);
    position: relative;
}

.home-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(45, 212, 160, 0.3) 20%,
        rgba(251, 191, 36, 0.4) 50%,
        rgba(45, 212, 160, 0.3) 80%,
        transparent);
    pointer-events: none;
}

.home-cta h2 {
    background: linear-gradient(120deg, #6ee7b7, #2dd4a0 35%, #fbbf24 70%, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.home-cta p {
    color: var(--text-light);
}

/* ────────────────────────────────────────────────────────────────
 * Auth Card - Cultivation gate styling
 * ──────────────────────────────────────────────────────────────── */

.auth-card {
    background: linear-gradient(160deg, rgba(18, 18, 30, 0.92), rgba(8, 8, 16, 0.96));
    border: 1px solid rgba(45, 212, 160, 0.12);
    box-shadow:
        0 8px 32px -16px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(45, 212, 160, 0.06);
}

.auth-card h2 {
    color: #e8e4d9;
    text-shadow: 0 2px 12px rgba(45, 212, 160, 0.12);
}

.auth-card .form-group label {
    color: #e8e4d9;
}

.auth-card .form-group input {
    background: var(--xianxia-parchment);
    border: 1px solid rgba(45, 212, 160, 0.12);
    color: var(--text-color);
}

.auth-card .form-group input:focus {
    border-color: var(--xianxia-jade);
    box-shadow: 0 0 12px rgba(45, 212, 160, 0.2);
}

.auth-card a {
    color: var(--xianxia-jade);
}

.auth-card a:hover {
    text-shadow: 0 0 8px rgba(45, 212, 160, 0.3);
}

/* ────────────────────────────────────────────────────────────────
 * Feature Icons - Cultivation element styling
 * ──────────────────────────────────────────────────────────────── */

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    transition: transform 0.4s, box-shadow 0.4s;
}

.feature-icon.primary {
    background: linear-gradient(135deg, rgba(45, 212, 160, 0.15), rgba(45, 212, 160, 0.05));
    color: var(--xianxia-jade);
    border: 1px solid rgba(45, 212, 160, 0.2);
}

.feature-icon.secondary {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
    color: var(--xianxia-gold);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.feature-icon.success {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(167, 139, 250, 0.05));
    color: var(--xianxia-spirit);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card:hover .feature-icon.primary {
    box-shadow: 0 0 24px rgba(45, 212, 160, 0.2);
}

.feature-card:hover .feature-icon.secondary {
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.2);
}

.feature-card:hover .feature-icon.success {
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.2);
}

/* ────────────────────────────────────────────────────────────────
 * Enhanced card hover with image zoom
 * ──────────────────────────────────────────────────────────────── */

.card-image,
img.card-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image,
.card:hover img.card-image {
    transform: scale(1.05);
}

.card-body {
    transition: transform 0.4s ease;
}

.card:hover .card-body {
    transform: translateY(-2px);
}

/* ────────────────────────────────────────────────────────────────
 * Hero text glow animation
 * ──────────────────────────────────────────────────────────────── */

.hero h1 {
    animation: heroTextGlow 4s ease-in-out infinite;
}

@keyframes heroTextGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(45, 212, 160, 0.15));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(45, 212, 160, 0.35)) drop-shadow(0 0 40px rgba(251, 191, 36, 0.15));
    }
}

/* ────────────────────────────────────────────────────────────────
 * Hero floating qi particles (CSS-only)
 * ──────────────────────────────────────────────────────────────── */

.hero {
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(45, 212, 160, 0.4), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(251, 191, 36, 0.3), transparent),
        radial-gradient(1px 1px at 60% 40%, rgba(167, 139, 250, 0.3), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(45, 212, 160, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 10% 80%, rgba(251, 191, 36, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 90% 20%, rgba(167, 139, 250, 0.3), transparent);
    background-size: 200px 200px;
    animation: heroParticleFloat 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

@keyframes heroParticleFloat {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    to { background-position: -200px 200px, 200px -200px, -200px -200px, 200px 200px, -200px 200px, 200px -200px; }
}

/* ────────────────────────────────────────────────────────────────
 * Button press feedback
 * ──────────────────────────────────────────────────────────────── */

.btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.btn-primary:active,
.btn-secondary:active {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ────────────────────────────────────────────────────────────────
 * Navbar scroll effect
 * ──────────────────────────────────────────────────────────────── */

.navbar {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.navbar.navbar-scrolled {
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(45, 212, 160, 0.06);
    background: linear-gradient(180deg, rgba(4, 4, 8, 0.97) 0%, rgba(8, 8, 16, 0.94) 100%);
}

/* ────────────────────────────────────────────────────────────────
 * Section divider glow pulse
 * ──────────────────────────────────────────────────────────────── */

.section + .section::before {
    animation: sectionDividerGlow 3s ease-in-out infinite;
}

@keyframes sectionDividerGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ────────────────────────────────────────────────────────────────
 * Reduced motion — honour user preference
 * ──────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .hero h1 { animation: none; }
    .hero::after { animation: none; }
    .section + .section::before { animation: none; }
}
