/* ==========================================================================
   CON ĐƯỜNG BÁ CHỦ - TU TIÊN GIỚI STYLESHEET
   Aesthetic: Dark Xianxia Glassmorphism (Vàng Kim & Xanh Lam Tiên Khí)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Philosopher:ital,wght@0,700;1,700&family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700&family=Nunito:wght@400;600;700;800;900&display=swap&subset=vietnamese');

:root {
    --gold-primary: #ffd700;
    --gold-light: #ffe57f;
    --gold-dark: #b8860b;
    --cyan-primary: #00e5ff;
    --cyan-light: #84ffff;
    --cyan-dark: #0097a7;
    --purple-primary: #a855f7;
    --bg-dark: #080312;
    --bg-card: rgba(13, 7, 24, 0.85);
    --border-gold: rgba(255, 215, 0, 0.35);
    --border-cyan: rgba(0, 229, 255, 0.35);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    color: #e2e8f0;
    background: linear-gradient(180deg, rgba(6, 3, 14, 0.82) 0%, rgba(9, 4, 20, 0.90) 60%, rgba(5, 2, 10, 0.98) 100%),
                url('/assets/images/bg_hero_lite.jpg') center top / cover no-repeat fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #080312;
}
::-webkit-scrollbar-thumb {
    background: #4a2800;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: #b8860b;
}

a {
    color: var(--cyan-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--gold-primary);
    text-decoration: none;
}

.font-cinzel, .font-heading {
    font-family: 'Philosopher', 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

/* Gradients text */
.gold-gradient-text {
    background: linear-gradient(135deg, #fff7b8 0%, #ffd700 45%, #e6a100 80%, #b37400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
}

.cyan-gradient-text {
    background: linear-gradient(135deg, #e8ffff 0%, #00e5ff 50%, #0088cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(0, 229, 255, 0.4));
}

.rainbow-gradient-text {
    background: linear-gradient(90deg, #ff3366, #ff9900, #ffea00, #33cc66, #00e5ff, #3366ff, #d500f9, #ff3366);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 5s linear infinite;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4)) drop-shadow(0 0 16px rgba(0, 229, 255, 0.35));
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Borders */
.gold-border {
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.12), inset 0 0 15px rgba(255, 215, 0, 0.05);
}

.cyan-border {
    border: 1px solid var(--border-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.12), inset 0 0 15px rgba(0, 229, 255, 0.05);
}

.card-glass {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 1rem;
}

/* Buttons */
.btn-gold {
    background: linear-gradient(180deg, #ffe066 0%, #d49511 50%, #9e6800 100%);
    box-shadow: 0 4px 18px rgba(212, 149, 17, 0.45);
    color: #1a0800 !important;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    display: inline-block;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.65);
    filter: brightness(1.1);
}

.btn-cyan {
    background: linear-gradient(180deg, #5df3ff 0%, #00b4db 50%, #006da8 100%);
    box-shadow: 0 4px 18px rgba(0, 180, 219, 0.45);
    color: #021a24 !important;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    display: inline-block;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 229, 255, 0.65);
    filter: brightness(1.1);
}

/* Logo animation */
@keyframes floatSoft {
    0%, 100% { transform: translateY(0px); filter: drop-shadow(0 10px 20px rgba(255, 215, 0, 0.3)); }
    50% { transform: translateY(-8px); filter: drop-shadow(0 15px 30px rgba(0, 229, 255, 0.45)); }
}
.logo-float {
    animation: floatSoft 4.5s ease-in-out infinite;
}

/* Container override */
.container {
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

/* Navbar */
.head {
    background: rgba(9, 4, 20, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-link-tutien {
    color: #cbd5e1;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    transition: all 0.2s ease;
}
.nav-link-tutien:hover {
    color: var(--gold-primary);
}
.nav-link-tutien.active {
    color: var(--cyan-primary);
}

/* ========================================================
   TU TIÊN BACKGROUND MUSIC PLAYER (WIDGET ÂM NHẠC TRANG CHỦ)
   ======================================================== */
.tutien-bgm-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    background: rgba(12, 18, 32, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 215, 0, 0.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.25);
    border-radius: 50px;
    padding: 6px 14px 6px 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}
.tutien-bgm-floating:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: #00e5ff;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 215, 0, 0.4);
}
.tutien-bgm-disc {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ff8c00 70%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d1117;
    font-size: 1rem;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.tutien-bgm-disc.playing {
    animation: spinDisc 6s linear infinite;
    background: radial-gradient(circle, #00e5ff 0%, #0077ff 70%, #1a1a2e 100%);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.7);
}
@keyframes spinDisc {
    100% { transform: rotate(360deg); }
}
.tutien-bgm-equalizer {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-left: 8px;
    margin-right: 6px;
}
.tutien-bgm-bar {
    width: 3px;
    height: 4px;
    background: #00e5ff;
    border-radius: 2px;
    transition: height 0.2s ease;
}
.tutien-bgm-equalizer.active .tutien-bgm-bar:nth-child(1) {
    animation: eqWave 0.8s ease-in-out infinite alternate;
}
.tutien-bgm-equalizer.active .tutien-bgm-bar:nth-child(2) {
    animation: eqWave 0.6s ease-in-out infinite 0.2s alternate;
}
.tutien-bgm-equalizer.active .tutien-bgm-bar:nth-child(3) {
    animation: eqWave 0.9s ease-in-out infinite 0.4s alternate;
}
.tutien-bgm-equalizer.active .tutien-bgm-bar:nth-child(4) {
    animation: eqWave 0.7s ease-in-out infinite 0.1s alternate;
}
@keyframes eqWave {
    0% { height: 3px; }
    100% { height: 14px; background: #ffd700; }
}
.tutien-bgm-text {
    display: flex;
    flex-direction: column;
    margin-left: 6px;
    line-height: 1.1;
}
.tutien-bgm-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.tutien-bgm-subtitle {
    font-size: 0.65rem;
    color: #94a3b8;
    white-space: nowrap;
}
@media (max-width: 576px) {
    .tutien-bgm-floating {
        bottom: 16px;
        right: 16px;
        padding: 5px 10px 5px 6px;
    }
    .tutien-bgm-text {
        display: none;
    }
}


/* Banner nhắc bật nhạc Tiên Âm */
.tutien-audio-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10001;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(35, 20, 55, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 2px solid rgba(255, 215, 0, 0.7);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 215, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}
.tutien-audio-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
.tutien-bgm-floating.waiting {
    animation: pulseBgmGold 2s infinite ease-in-out;
    border-color: #ffd700;
}
@keyframes pulseBgmGold {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 8px 32px rgba(0,0,0,0.6); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.85), 0 8px 32px rgba(0,0,0,0.8); border-color: #00e5ff; }
}
