
@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;

    /* ==========================================================================
       THEME PRESETS & DESIGN TOKENS (HỆ THỐNG BIẾN ROOT TÙY BIẾN CHO VTUBER)
       Để tạo giao diện cho VTuber khác, chỉ cần thay đổi các mã màu trong khối này!
       ========================================================================== */

    /* --- 1. TÔNG MÀU CHỦ ĐẠO (PRIMARY ACCENT) - Mặc định: Vàng Hoàng Kim (Gold / Amber) --- */
    --theme-primary: #f59e0b;
    --theme-primary-hover: #fbbf24;
    --theme-primary-active: #d97706;
    --theme-primary-light: #fef3c7;
    --theme-primary-dark: #b45309;
    
    /* Kênh RGB của màu chủ đạo (dùng để áp dụng độ trong suốt rgba linh hoạt) */
    --theme-primary-rgb: 245, 158, 11;
    --theme-primary-hover-rgb: 251, 191, 36;
    --theme-primary-active-rgb: 217, 119, 6;
    --theme-primary-light-rgb: 254, 243, 199;

    /* --- 2. TÔNG MÀU PHỤ / KIM LOẠI (SECONDARY / ACCENT METAL) - Ánh Vàng Nhạt (Warm Gold) --- */
    --theme-secondary: #fef08a;
    --theme-secondary-hover: #ffffff;
    --theme-secondary-muted: #d4d4d8;
    --theme-secondary-rgb: 254, 240, 138;
    --theme-secondary-muted-rgb: 212, 212, 216;

    /* --- 3. MÀU NỀN TỔNG THỂ & TINT CARD GLASSMORPHISM --- */
    --theme-bg-body: #0d0a06;
    --theme-bg-rgb: 13, 10, 6;
    
    /* Màu nền đổ bóng và gradient thẻ kính (Glassmorphism Tint) */
    --theme-tint-card-start: rgba(36, 26, 12, 0.65);
    --theme-tint-card-end: rgba(20, 14, 8, 0.75);
    --theme-tint-card-hover-start: rgba(48, 34, 16, 0.82);
    --theme-tint-card-hover-end: rgba(28, 18, 10, 0.88);
    --theme-tint-popup-start: rgba(36, 26, 12, 0.97);
    --theme-tint-popup-end: rgba(18, 13, 7, 0.98);
    --theme-tint-header-start: rgba(18, 13, 7, 0.95);

    /* --- 4. GRADIENTS TIÊU CHUẨN --- */
    --theme-gradient-primary: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-active) 100%);
    --theme-gradient-hover: linear-gradient(135deg, var(--theme-primary-hover) 0%, var(--theme-primary) 100%);
    --theme-gradient-primary-full: linear-gradient(135deg, var(--theme-primary-hover) 0%, var(--theme-primary) 50%, var(--theme-primary-active) 100%);
    --theme-gradient-card: linear-gradient(135deg, var(--theme-tint-card-start) 0%, var(--theme-tint-card-end) 100%);
    --theme-gradient-card-active: linear-gradient(135deg, var(--theme-tint-card-hover-start) 0%, var(--theme-tint-card-hover-end) 100%);
    --theme-gradient-popup: linear-gradient(135deg, var(--theme-tint-popup-start) 0%, var(--theme-tint-popup-end) 100%);

    /* --- 5. BÓNG ĐỔ & PHÁT SÁNG (GLOW & SHADOW EFFECTS) --- */
    --theme-glow-sm: 0 0 16px rgba(var(--theme-primary-rgb), 0.25);
    --theme-glow-md: 0 0 24px rgba(var(--theme-primary-rgb), 0.4);
    --theme-glow-lg: 0 0 36px rgba(var(--theme-primary-rgb), 0.55);
    --theme-card-shadow: 0 16px 40px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(var(--theme-secondary-rgb), 0.18);
    --theme-card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(var(--theme-primary-rgb), 0.22), inset 0 1px 0 rgba(var(--theme-secondary-rgb), 0.25);
    --theme-btn-shadow: 0 6px 20px rgba(var(--theme-primary-rgb), 0.35);
    --theme-btn-hover-shadow: 0 8px 26px rgba(var(--theme-primary-rgb), 0.55);

    /* --- 6. HỆ THỐNG MÀU CHỮ (TYPOGRAPHY) --- */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-accent: var(--theme-primary-hover);

    /* --- 7. MÀU TRẠNG THÁI & CHỈ SỐ (ACCENTS & STATUS) --- */
    --accent-gold: #fde047;
    --accent-gold-rgb: 253, 224, 71;
    --accent-cyan: #38bdf8;
    --accent-cyan-rgb: 56, 189, 248;
    --accent-pink: #f472b6;
    --accent-pink-rgb: 244, 114, 182;
    --accent-success: #10b981;
    --accent-success-rgb: 16, 185, 129;

    /* --- 8. TƯƠNG THÍCH NGƯỢC (LEGACY ALIASES CHO CODE CŨ) --- */
    --white: #F3F4F5;
    --black: #19191E;
    --accent-red: var(--theme-primary);
    --accent-red-hover: var(--theme-primary-hover);
    --accent-red-dark: var(--theme-primary-active);
    --accent-glow: rgba(var(--theme-primary-rgb), 0.45);

    --silver: var(--theme-secondary);
    --silver-light: var(--theme-secondary-hover);
    --silver-dark: var(--theme-secondary-muted);
    --silver-glow: rgba(var(--theme-secondary-rgb), 0.35);

    --card-bg: var(--theme-tint-card-start);
    --card-bg-hover: var(--theme-tint-card-hover-start);
    --card-border: 1px solid rgba(var(--theme-secondary-rgb), 0.18);
    --card-border-hover: 1px solid rgba(var(--theme-primary-rgb), 0.45);
    --card-radius: 28px;
    --card-shadow: var(--theme-card-shadow);
    --glass-blur: blur(18px) saturate(1.25);

    --input-bg: rgba(255, 255, 255, 0.08);
    --input-bg-hover: rgba(255, 255, 255, 0.12);
    --input-bg-focus: rgba(var(--theme-primary-rgb), 0.12);
    --input-border: 1px solid rgba(var(--theme-secondary-rgb), 0.18);
    --input-border-hover: 1px solid rgba(var(--theme-secondary-rgb), 0.35);
    --input-border-focus: 1px solid rgba(var(--theme-primary-rgb), 0.6);
    --input-radius: 20px;
    --input-height: 48px;

    --font-family: 'Mulish', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   EXAMPLE THEME PRESETS (MẪU TÙY BIẾN CHO CÁC VTUBER KHÁC)
   Cách dùng: Thêm thuộc tính data-theme="..." vào thẻ <html> hoặc <body>
   Ví dụ: <html data-theme="purple"> hoặc <body data-theme="cyan">
   ========================================================================== */

/* --- VTUBER THEME: TÍM HUYỀN ẢO (PURPLE NEON) --- */
:root[data-theme="purple"], [data-theme="purple"] {
    --theme-primary: #a855f7;
    --theme-primary-hover: #c084fc;
    --theme-primary-active: #9333ea;
    --theme-primary-light: #e9d5ff;
    --theme-primary-dark: #7e22ce;
    --theme-primary-rgb: 168, 85, 247;
    --theme-primary-hover-rgb: 192, 132, 252;
    --theme-primary-active-rgb: 147, 51, 234;
    --theme-primary-light-rgb: 233, 213, 255;

    --theme-secondary: #cbd5e1;
    --theme-secondary-hover: #f8fafc;
    --theme-secondary-muted: #94a3b8;
    --theme-secondary-rgb: 203, 213, 225;

    --theme-bg-body: #0a0612;
    --theme-tint-card-start: rgba(28, 14, 38, 0.65);
    --theme-tint-card-end: rgba(16, 9, 24, 0.75);
    --theme-tint-card-hover-start: rgba(38, 18, 52, 0.82);
    --theme-tint-card-hover-end: rgba(22, 11, 32, 0.88);
    --theme-tint-popup-start: rgba(24, 12, 34, 0.97);
    --theme-tint-popup-end: rgba(14, 7, 20, 0.98);
}

/* --- VTUBER THEME: XANH BĂNG TUYẾT / CYAN (CYAN & FROST) --- */
:root[data-theme="cyan"], [data-theme="cyan"] {
    --theme-primary: #06b6d4;
    --theme-primary-hover: #22d3ee;
    --theme-primary-active: #0891b2;
    --theme-primary-light: #cffafe;
    --theme-primary-dark: #0e7490;
    --theme-primary-rgb: 6, 182, 212;
    --theme-primary-hover-rgb: 34, 211, 238;
    --theme-primary-active-rgb: 8, 145, 178;
    --theme-primary-light-rgb: 207, 250, 254;

    --theme-secondary: #e2e8f0;
    --theme-secondary-hover: #ffffff;
    --theme-secondary-muted: #94a3b8;
    --theme-secondary-rgb: 226, 232, 240;

    --theme-bg-body: #040d12;
    --theme-tint-card-start: rgba(8, 28, 36, 0.65);
    --theme-tint-card-end: rgba(6, 18, 24, 0.75);
    --theme-tint-card-hover-start: rgba(12, 38, 48, 0.82);
    --theme-tint-card-hover-end: rgba(8, 24, 32, 0.88);
    --theme-tint-popup-start: rgba(10, 32, 42, 0.97);
    --theme-tint-popup-end: rgba(6, 16, 22, 0.98);
}

/* --- VTUBER THEME: VÀNG HOÀNG KIM / NẮNG SỚM (GOLD / AMBER) --- */
:root[data-theme="gold"], [data-theme="gold"] {
    --theme-primary: #f59e0b;
    --theme-primary-hover: #fbbf24;
    --theme-primary-active: #d97706;
    --theme-primary-light: #fef3c7;
    --theme-primary-dark: #b45309;
    --theme-primary-rgb: 245, 158, 11;
    --theme-primary-hover-rgb: 251, 191, 36;
    --theme-primary-active-rgb: 217, 119, 6;
    --theme-primary-light-rgb: 254, 243, 199;

    --theme-secondary: #fef08a;
    --theme-secondary-hover: #ffffff;
    --theme-secondary-muted: #d4d4d8;
    --theme-secondary-rgb: 254, 240, 138;

    --theme-bg-body: #100c05;
    --theme-tint-card-start: rgba(36, 26, 10, 0.65);
    --theme-tint-card-end: rgba(22, 16, 8, 0.75);
    --theme-tint-card-hover-start: rgba(48, 34, 14, 0.82);
    --theme-tint-card-hover-end: rgba(30, 22, 10, 0.88);
    --theme-tint-popup-start: rgba(38, 28, 12, 0.97);
    --theme-tint-popup-end: rgba(20, 14, 6, 0.98);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    color-scheme: dark;
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--theme-bg-body);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    position: fixed;
    top: 15px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#header {
    width: 90%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.logo img {
    position: absolute;
    height: 52px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    top: -2px;
    left: 0px;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

/* ============================================================
   MAGIC NAVIGATION MENU (DESKTOP)
   ============================================================ */
nav#mainNav {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: rgba(18, 10, 24, 0.75);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.18);
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--theme-primary-rgb), 0.15);
}

.magic-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 0;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.38) 0%, rgba(var(--theme-primary-hover-rgb), 0.22) 100%);
    border: 1px solid rgba(var(--theme-primary-hover-rgb), 0.7);
    box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), 
                width 0.34s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.25s ease;
}

nav#mainNav > a,
nav#mainNav .nav-logout-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 9999px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    user-select: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

nav#mainNav > a:hover,
nav#mainNav .nav-logout-btn:hover {
    color: #ffffff;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

nav#mainNav > a.active {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(var(--theme-primary-hover-rgb), 0.7);
}

nav#mainNav > a .nav-icon,
nav#mainNav .nav-logout-btn .nav-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.25s ease;
}

nav#mainNav > a.active .nav-icon {
    transform: scale(1.15);
    stroke: var(--theme-primary-light);
}

nav#mainNav .nav-logout-btn {
    display: none;
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    color: var(--theme-primary-light);
}

body.is-logged-in nav#mainNav .nav-logout-btn {
    display: inline-flex;
}

nav#mainNav .nav-logout-btn:hover {
    color: #ffffff;
    transform: none;
}

.mobile-menu-btn {
    display: none;
}

.home {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--theme-bg-body, #050d14);
}

.home .move {
    position: absolute;
    inset: -60px;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    z-index: 0;
    overflow: hidden;
    transform-origin: center center;
    will-change: transform;
}

.donate-bg-video {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.08);
    will-change: transform;
    animation: bgLivingBreathe 22s ease-in-out infinite alternate;
}

@keyframes bgLivingBreathe {
    0% {
        transform: scale(1.08);
    }
    50% {
        transform: scale(1.12) translate3d(4px, -6px, 0);
    }
    100% {
        transform: scale(1.09) translate3d(-4px, 4px, 0);
    }
}

/* Ambient Glowing Orbs / Aurora Lights */
.home .ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.home .ambient-glow-1 {
    width: 55vw;
    height: 55vw;
    max-width: 680px;
    max-height: 680px;
    top: -12%;
    left: 15%;
    background: radial-gradient(circle, rgba(var(--theme-primary-rgb, 44, 185, 213), 0.38) 0%, rgba(var(--theme-primary-rgb, 44, 185, 213), 0) 70%);
    animation: ambientFloat1 18s ease-in-out infinite alternate;
}

.home .ambient-glow-2 {
    width: 50vw;
    height: 50vw;
    max-width: 580px;
    max-height: 580px;
    bottom: -15%;
    right: 10%;
    background: radial-gradient(circle, rgba(var(--theme-secondary-rgb, 186, 230, 253), 0.28) 0%, rgba(var(--theme-secondary-rgb, 186, 230, 253), 0) 70%);
    animation: ambientFloat2 24s ease-in-out infinite alternate;
}

.home .ambient-glow-3 {
    width: 38vw;
    height: 38vw;
    max-width: 440px;
    max-height: 440px;
    top: 40%;
    left: -8%;
    background: radial-gradient(circle, rgba(var(--theme-primary-rgb, 44, 185, 213), 0.22) 0%, rgba(var(--theme-primary-rgb, 44, 185, 213), 0) 70%);
    animation: ambientFloat3 16s ease-in-out infinite alternate;
}

@keyframes ambientFloat1 {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate3d(8%, 10%, 0) scale(1.15); opacity: 0.75; }
    100% { transform: translate3d(-6%, 6%, 0) scale(0.95); opacity: 0.45; }
}

@keyframes ambientFloat2 {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate3d(-10%, -8%, 0) scale(1.2); opacity: 0.65; }
    100% { transform: translate3d(6%, -10%, 0) scale(0.9); opacity: 0.35; }
}

@keyframes ambientFloat3 {
    0% { transform: translate3d(0, 0, 0) scale(0.92); opacity: 0.3; }
    50% { transform: translate3d(12%, -6%, 0) scale(1.12); opacity: 0.55; }
    100% { transform: translate3d(4%, 8%, 0) scale(1); opacity: 0.28; }
}

/* Floating Stardust Canvas */
.home .bg-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3;
    pointer-events: none;
}

/* Atmospheric Vignette & Theme Tint Overlay */
.home .overlay {
    position: absolute;
    inset: -60px;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    background: radial-gradient(circle at 50% 40%, rgba(var(--theme-bg-rgb, 5, 13, 20), 0.15) 0%, rgba(var(--theme-bg-rgb, 5, 13, 20), 0.55) 65%, rgba(var(--theme-bg-rgb, 5, 13, 20), 0.85) 100%),
                linear-gradient(180deg, rgba(var(--theme-bg-rgb, 5, 13, 20), 0.35) 0%, rgba(var(--theme-bg-rgb, 5, 13, 20), 0.05) 45%, rgba(var(--theme-bg-rgb, 5, 13, 20), 0.68) 100%);
    z-index: 2;
    will-change: transform;
}

main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 100px 20px 50px;
}

.donate-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 530px;
    gap: 12px;
    margin: 0 auto;
}

#slot-streamer-profile {
    width: 100%;
    display: contents;
}

#slot-feature-goal:empty,
#slot-feature-subathon:empty,
#slot-feature-gacha:empty,
#slot-feature-tts:empty,
.slot-feature-container:empty {
    display: none !important;
}

.donate-card {
    width: 100%;
    background-color: var(--card-bg);
    background-image: url("./assets/noise.webp");
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--white);
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.donate-card:hover {
    border: var(--card-border-hover);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.donate-card .ui-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.donate-card .firstimg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.donate-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.donate-profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.donate-profile-handle {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.68);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.donate-greeting {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    margin: 0;
}

.donate-section {
    width: 100%;
    background-color: var(--card-bg);
    background-image: url("./assets/noise.webp");
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 20px 24px;
    color: var(--white);
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.donate-section:hover {
    border: var(--card-border-hover);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#donateSection {
    display: none;
}
#loginSection {
    display: block;
}
#registerSection {
    display: none;
}
#qrSection {
    display: none;
}
#successSection {
    display: none;
}

body.is-logged-in #donateSection,
#donateSection.active {
    display: block;
}
body.is-logged-in #loginSection,
#loginSection.hidden {
    display: none;
}
#registerSection.active {
    display: block;
}
#qrSection.active {
    display: block;
}
#successSection.active {
    display: block;
}

.donate-form-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.donate-form-title icon,
.donate-form-title svg {
    width: 22px;
    height: 22px;
    opacity: 0.9;
    flex-shrink: 0;
}

.donate-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.donate-status-msg {
    display: none;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 4px;
    backdrop-filter: blur(8px);
}
.donate-status-msg:not(:empty),
.donate-status-msg.show {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.donate-error-msg {
    display: none;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-size: 14px;
    text-align: center;
    margin-bottom: 4px;
    backdrop-filter: blur(8px);
}
.donate-error-msg:not(:empty),
.donate-error-msg.show {
    display: block;
}

.input-box {
    position: relative;
    width: 100%;
    height: var(--input-height);
    display: flex;
    align-items: center;
    border-radius: var(--input-radius);
    background: var(--input-bg);
    border: var(--input-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--white);
    overflow: hidden;
}

.input-box:hover {
    background: var(--input-bg-hover);
    border: var(--input-border-hover);
}

.input-box:focus-within {
    background: var(--input-bg-focus);
    border: var(--input-border-focus);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

.input-box icon,
.input-box svg {
    position: absolute;
    left: 18px;
    width: 20px;
    height: 20px;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 2;
}

.input-box:focus-within icon,
.input-box:focus-within svg {
    opacity: 1;
}

.input-box input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 15px;
    font-family: inherit;
    padding-left: 50px;
    padding-right: 18px;
    border-radius: var(--input-radius);
    color-scheme: dark;
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
}

.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus,
.input-box input:-webkit-autofill:active,
.resizeable textarea:-webkit-autofill,
.resizeable textarea:-webkit-autofill:hover,
.resizeable textarea:-webkit-autofill:focus,
.resizeable textarea:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.6) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0) inset !important;
    transition: background-color 5000000s ease-in-out 0s, color 5000000s ease-in-out 0s !important;
    border-radius: var(--input-radius) !important;
    font-family: inherit !important;
    font-size: 15px !important;
}

.input-box:has(input:-webkit-autofill) {
    border-color: rgba(255, 255, 255, 0.35);
}

.resizeable {
    position: relative;
    width: 100%;
    min-height: 90px;
    display: flex;
    align-items: flex-start;
    border-radius: var(--input-radius);
    background: var(--input-bg);
    border: var(--input-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--white);
    overflow: hidden;
}

.resizeable:hover {
    background: var(--input-bg-hover);
    border: var(--input-border-hover);
}

.resizeable:focus-within {
    background: var(--input-bg-focus);
    border: var(--input-border-focus);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

.resizeable icon,
.resizeable svg {
    position: absolute;
    top: 14px;
    left: 18px;
    width: 20px;
    height: 20px;
    opacity: 0.75;
    pointer-events: none;
    z-index: 2;
}

.resizeable:focus-within icon,
.resizeable:focus-within svg {
    opacity: 1;
}

.resizeable textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 90px;
    padding: 14px 18px 14px 50px;
    line-height: 1.5;
    border-radius: var(--input-radius);
    color-scheme: dark;
}

.resizeable textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
}

.donate-btn-submit {
    width: 100%;
    height: var(--input-height);
    border-radius: var(--input-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-active) 50%, var(--theme-primary-dark) 100%);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(var(--theme-primary-rgb), 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 4px;
}

.donate-btn-submit icon,
.donate-btn-submit svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.donate-btn-submit:hover {
    background: var(--theme-gradient-primary-full);
    border-color: rgba(248, 250, 252, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(var(--theme-primary-rgb), 0.55), 0 0 16px rgba(var(--theme-secondary-rgb), 0.35);
}

.donate-btn-submit:active {
    transform: scale(0.98);
}

.donate-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.donate-auth-switch {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.donate-auth-link {
    color: var(--accent-red);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: all 0.2s ease;
}

.donate-auth-link:hover {
    color: var(--accent-red-hover);
    text-decoration: underline;
    text-shadow: 0 0 8px var(--accent-glow);
}

.donate-qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 10px 0;
}

.donate-qr-title {
    font-size: 18.5px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.donate-qr-title svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.donate-qr-box {
    background: #ffffff;
    padding: 14px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.donate-qr-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.donate-qr-info {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.donate-qr-amount {
    color: var(--accent-red-hover);
    font-weight: 800;
    font-size: 18px;
}

.donate-btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--input-radius);
    padding: 10px 24px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 4px;
}

.donate-btn-back:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* ==========================================================
   DONATE SUCCESS CARD & RECEIPT
========================================================== */
.donate-success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 18px 8px;
    animation: successEntrance 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successEntrance {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.donate-success-icon-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.donate-success-icon-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0) 70%);
    animation: successPulse 2s infinite ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.85);
        opacity: 0.8;
    }
}

.donate-success-icon {
    position: relative;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4));
    border: 1.5px solid rgba(16, 185, 129, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

.donate-success-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.donate-success-desc {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    margin: 0;
    max-width: 380px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.donate-success-receipt {
    width: 100%;
    max-width: 390px;
    background: rgba(18, 14, 28, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    margin-top: 4px;
}

.receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.receipt-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.receipt-label {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

.receipt-value {
    color: #ffffff;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.receipt-amount {
    color: #34d399;
    font-size: 18px;
    font-weight: 800;
}

.receipt-code {
    font-family: 'JetBrains Mono', monospace, inherit;
    color: #fca5a5;
    font-size: 13.5px;
    background: rgba(var(--theme-primary-hover-rgb), 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(var(--theme-primary-hover-rgb), 0.25);
}

.donate-btn-continue {
    width: 100%;
    max-width: 390px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    font-size: 15.5px;
    font-weight: 700;
}

.side-controls {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 12, 22, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 90;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.side-btn {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.side-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    color: var(--white);
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

icon.person {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

icon.password {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z'/%3E%3C/svg%3E");
}

icon.login {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M11 7L9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M11 7L9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z'/%3E%3C/svg%3E");
}

icon.lock {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

icon.coffee {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z'/%3E%3C/svg%3E");
}

icon.bank {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z'/%3E%3C/svg%3E");
}

icon.chat {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z'/%3E%3C/svg%3E");
}

icon.send {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E");
}

icon.mail {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

icon.person_add {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm-9-4V7H4v3H1v2h3v3h2v-3h3v-2H6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm-9-4V7H4v3H1v2h3v3h2v-3h3v-2H6z'/%3E%3C/svg%3E");
}

icon.check_circle {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

icon.qr_code_scanner {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM2 2h4v2H4v2H2V2zm18 0h4v4h-2V4h-2V2zM2 18h2v2h2v2H2v-4zm18 2h-2v2h4v-4h-2v2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM2 2h4v2H4v2H2V2zm18 0h4v4h-2V4h-2V2zM2 18h2v2h2v2H2v-4zm18 2h-2v2h4v-4h-2v2z'/%3E%3C/svg%3E");
}

icon.undo {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z'/%3E%3C/svg%3E");
}

icon.headphones {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 3a9 9 0 0 0-9 9v7c0 1.1.9 2 2 2h4v-8H5v-1a7 7 0 0 1 14 0v1h-4v8h4c1.1 0 2-.9 2-2v-7a9 9 0 0 0-9-9z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 3a9 9 0 0 0-9 9v7c0 1.1.9 2 2 2h4v-8H5v-1a7 7 0 0 1 14 0v1h-4v8h4c1.1 0 2-.9 2-2v-7a9 9 0 0 0-9-9z'/%3E%3C/svg%3E");
}

icon.burger {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'/%3E%3C/svg%3E");
}

icon.autorenew {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z'/%3E%3C/svg%3E");
    animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 5px 8px 5px 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-greeting {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-admin-btn {
    background: rgba(var(--theme-primary-rgb), 0.18);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.45);
    color: var(--theme-primary-light) !important;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-admin-btn:hover {
    background: rgba(var(--theme-primary-rgb), 0.35);
    border-color: rgba(var(--theme-secondary-rgb), 0.5);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(var(--theme-primary-rgb), 0.4);
}

.btn-logout {
    background: rgba(var(--theme-secondary-rgb), 0.12);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.25);
    color: var(--silver-light);
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-logout icon {
    width: 14px;
    height: 14px;
}

.btn-logout:hover {
    background: rgba(var(--theme-primary-rgb), 0.25);
    border-color: rgba(var(--theme-primary-rgb), 0.45);
    color: #ffffff;
    transform: translateY(-1px);
}

.mobile-magic-bar {
    display: none;
}

@media (max-width: 768px) {
    header {
        height: 66px;
    }

    header {
        position: fixed;
        top: 10px;
        left: 0;
        width: 100%;
        height: 72px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        pointer-events: none;
    }

    #header {
        width: 92%;
        height: 100%;
        justify-content: center;
        align-items: center;
    }

    .logo {
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: auto;
    }

    .logo img {
        position: relative;
        height: 68px;
        width: auto;
        max-width: 220px;
        top: auto;
        left: auto;
        transform: none;
        object-fit: contain;
        filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 16px rgba(var(--theme-primary-rgb), 0.3));
        transition: transform 0.25s ease;
    }

    .logo img:active {
        transform: scale(0.96);
    }

    .mobile-menu-btn {
        display: none !important;
    }

    nav#mainNav {
        display: none !important;
    }

    main {
        padding-bottom: 96px !important;
    }

    /* Mobile Magic Navigation Bar (Curved Notch Dock) */
    .mobile-magic-bar {
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 12px 14px;
        z-index: 999;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }

    body.keyboard-open .mobile-magic-bar {
        transform: translateY(130%);
        opacity: 0;
        pointer-events: none;
    }

    .magic-dock {
        position: relative;
        width: 100%;
        max-width: 440px;
        height: 72px;
        background: rgba(18, 10, 24, 0.94);
        backdrop-filter: blur(24px) saturate(1.5);
        -webkit-backdrop-filter: blur(24px) saturate(1.5);
        border-radius: 26px;
        border: 1px solid rgba(var(--theme-secondary-rgb), 0.16);
        box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(var(--theme-primary-rgb), 0.2);
        pointer-events: auto;
        display: flex;
        align-items: center;
        padding: 0;
    }

    .magic-dock-list {
        display: flex;
        width: 100%;
        height: 100%;
        position: relative;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .magic-dock-item {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        height: 100%;
        z-index: 2;
        list-style: none;
    }

    .magic-dock-link {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        padding: 0;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .magic-dock-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        color: var(--text-secondary);
        transform: translateY(0);
        transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease, filter 0.25s ease;
    }

    .magic-dock-icon svg {
        width: 22px;
        height: 22px;
        transition: stroke 0.25s ease;
    }

    .magic-dock-title {
        position: absolute;
        bottom: 7px;
        left: 0;
        right: 0;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.2px;
        color: var(--theme-primary-light);
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease, visibility 0.25s ease;
        pointer-events: none;
        white-space: nowrap;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    }

    /* Active Item State: Khi nhấn/active mới đưa cao lên 1 ít, lọt vào giữa vòng tròn */
    .magic-dock-item.active .magic-dock-icon {
        transform: translateY(-10px) scale(1.02);
        color: #ffffff;
        filter: drop-shadow(0 0 10px rgba(var(--theme-primary-hover-rgb), 0.85));
    }

    .magic-dock-item.active .magic-dock-icon svg {
        stroke: #ffffff;
    }

    .magic-dock-item.active .magic-dock-title {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Hiệu ứng đàn hồi khi chạm vào */
    .magic-dock-item:active .magic-dock-icon {
        transform: translateY(-10px) scale(0.92);
    }

    /* Nút Đăng xuất trên mobile dock */
    .magic-dock-item#mobileDockAuthItem {
        display: none;
    }

    body.is-logged-in .magic-dock-item#mobileDockAuthItem {
        display: block;
    }

    /* Magic Indicator: Vòng tròn hốc giếng lõm lún sâu 3D đón lấy icon khi đưa cao lên */
    .magic-dock-indicator {
        position: absolute;
        top: 5px;
        left: 0;
        width: 25%;
        height: 42px;
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: none;
        z-index: 1;
        transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .indicator-bubble {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(180deg, rgba(16, 8, 18, 0.95) 0%, rgba(var(--theme-primary-active-rgb), 0.4) 60%, rgba(var(--theme-primary-rgb), 0.6) 100%);
        border: 1.5px solid rgba(var(--theme-primary-hover-rgb), 0.55);
        border-top: 1.5px solid rgba(0, 0, 0, 0.9);
        box-shadow: 
            inset 0 5px 12px rgba(0, 0, 0, 0.9),
            inset 0 -3px 8px rgba(var(--theme-primary-rgb), 0.5),
            0 0 18px rgba(var(--theme-primary-rgb), 0.4),
            0 1px 1px rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 540px) {
    header {
        top: 8px;
        height: 70px;
    }

    .logo img {
        height: 64px;
        width: auto;
        max-width: 210px;
    }

    main {
        padding: 90px 14px 96px;
    }

    .donate-card,
    .donate-section {
        padding: 20px;
        border-radius: 22px;
    }

    .donate-profile-name {
        font-size: 18px;
    }

    .donate-form-title {
        font-size: 17px;
    }

    .input-box,
    .donate-btn-submit {
        height: 44px;
        font-size: 15px;
    }

    .side-controls {
        right: 8px;
    }
}

nav > a.active {
    background-color: rgba(var(--theme-primary-rgb), 0.28);
    box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.45), 0 0 10px rgba(var(--theme-secondary-rgb), 0.2);
    border-color: rgba(var(--theme-secondary-rgb), 0.6);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(var(--theme-primary-rgb), 0.5);
}

.donate-section-subtitle {
    text-align: center;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: -12px;
    margin-bottom: 20px;
}

.lb-period-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lb-period-btn {
    padding: 7px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lb-period-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.lb-period-btn.active {
    background: rgba(var(--theme-primary-rgb), 0.22);
    border-color: var(--theme-primary);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(var(--theme-primary-rgb), 0.35);
}

.lb-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.lb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lb-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.lb-item.rank-1 {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.22), rgba(var(--theme-primary-active-rgb), 0.1));
    border-color: rgba(var(--theme-primary-rgb), 0.55);
    box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), 0.25), inset 0 1px 0 rgba(248, 250, 252, 0.25);
}

.lb-item.rank-2 {
    background: linear-gradient(135deg, rgba(var(--theme-secondary-rgb), 0.18), rgba(var(--theme-secondary-muted-rgb), 0.08));
    border-color: rgba(var(--theme-secondary-rgb), 0.45);
    box-shadow: 0 4px 18px rgba(var(--theme-secondary-rgb), 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lb-item.rank-3 {
    background: linear-gradient(135deg, rgba(var(--theme-secondary-muted-rgb), 0.14), rgba(71, 85, 105, 0.08));
    border-color: rgba(var(--theme-secondary-muted-rgb), 0.35);
}

.lb-rank-badge {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.rank-1 .lb-rank-badge {
    background: var(--theme-gradient-hover);
    color: #ffffff;
    border: 1px solid rgba(248, 250, 252, 0.4);
    box-shadow: 0 0 14px rgba(var(--theme-primary-rgb), 0.6);
}

.rank-2 .lb-rank-badge {
    background: linear-gradient(135deg, var(--theme-secondary-hover) 0%, var(--theme-secondary) 100%);
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 12px rgba(var(--theme-secondary-rgb), 0.4);
}

.rank-3 .lb-rank-badge {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #ffffff;
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.35);
}

.lb-rank-badge.rank-other {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
}

.lb-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    margin-left: 12px;
    overflow: hidden;
}

.lb-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(var(--theme-primary-rgb), 0.18);
    color: var(--theme-primary-light);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.lb-user-name {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-amount {
    font-family: 'Outfit', monospace;
    font-weight: 700;
    font-size: 15.5px;
    color: var(--theme-primary-light);
    text-shadow: 0 0 8px rgba(var(--theme-primary-rgb), 0.4);
    flex-shrink: 0;
}

.current-user-rank-box {
    margin-top: 15px;
    padding: 14px 18px;
    background: rgba(var(--theme-primary-rgb), 0.1);
    border: 1px dashed rgba(var(--theme-secondary-rgb), 0.45);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.current-user-rank-title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--silver);
    margin-bottom: 2px;
}

.current-user-rank-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.current-user-rank-score {
    font-size: 13px;
    color: var(--theme-primary-light);
    font-weight: 600;
}

.current-user-rank-pill {
    padding: 6px 14px;
    background: var(--theme-gradient-primary);
    color: #ffffff;
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.4);
    border-radius: 9999px;
    font-weight: 800;
    font-size: 13.5px;
    box-shadow: 0 0 12px rgba(var(--theme-primary-rgb), 0.4);
    flex-shrink: 0;
}

.history-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-item {
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.history-donor-name {
    font-weight: 700;
    font-size: 14.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-amount {
    font-family: 'Outfit', monospace;
    font-weight: 700;
    font-size: 15px;
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.35);
}

.history-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(0, 0, 0, 0.28);
    padding: 8px 12px;
    border-radius: 10px;
    border-left: 3px solid var(--theme-primary);
    word-break: break-word;
}

.history-time {
    font-size: 11.5px;
    font-family: monospace;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.45);
    align-self: flex-end;
    white-space: nowrap;
}

.lb-loading,
.history-loading,
.lb-empty,
.history-empty {
    text-align: center;
    padding: 24px 16px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

/* ==========================================================================
   GACHA DONATE SECTION & LIVE CALCULATOR (RUBY & SILVER THEME)
   ========================================================================== */
.gacha-donate-container {
    margin: 14px 0 6px 0;
    width: 100%;
}

.gacha-toggle-card {
    position: relative;
    background: linear-gradient(135deg, var(--theme-tint-card-start) 0%, var(--theme-tint-card-end) 100%);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.18);
    border-radius: var(--input-radius, 20px);
    padding: 14px 18px;
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.gacha-toggle-card:hover {
    border-color: rgba(var(--theme-primary-rgb), 0.42);
    box-shadow: 0 6px 26px rgba(var(--theme-primary-rgb), 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.gacha-toggle-card.is-active,
.gacha-toggle-card:has(#gachaOptInToggle:checked) {
    border-color: rgba(var(--theme-primary-rgb), 0.55);
    background: linear-gradient(135deg, var(--theme-tint-card-hover-start) 0%, var(--theme-tint-card-hover-end) 100%);
    box-shadow: 0 10px 32px rgba(var(--theme-primary-rgb), 0.22), 0 0 0 1px rgba(var(--theme-primary-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.gacha-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.gacha-toggle-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.gacha-toggle-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(var(--theme-primary-rgb), 0.12);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.28);
    color: var(--theme-primary-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(var(--theme-primary-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gacha-wheel-svg {
    width: 22px;
    height: 22px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gacha-toggle-card:hover .gacha-toggle-icon {
    background: rgba(var(--theme-primary-rgb), 0.2);
    border-color: rgba(var(--theme-primary-rgb), 0.45);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.4);
}

.gacha-toggle-card:hover .gacha-wheel-svg {
    transform: rotate(45deg);
}

.gacha-toggle-card.is-active .gacha-toggle-icon,
.gacha-toggle-card:has(#gachaOptInToggle:checked) .gacha-toggle-icon {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.35), rgba(var(--theme-primary-active-rgb), 0.25));
    border-color: rgba(var(--theme-primary-hover-rgb), 0.65);
    color: #ffffff;
    box-shadow: 0 0 22px rgba(var(--theme-primary-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: gachaIconPulse 3s infinite ease-in-out;
}

@keyframes gachaIconPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(var(--theme-primary-rgb), 0.5)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 14px rgba(var(--theme-primary-hover-rgb), 0.8)); }
}

.gacha-toggle-texts {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.gacha-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gacha-toggle-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    font-family: var(--font-family);
}

.gacha-live-pill {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--theme-primary-light);
    background: rgba(var(--theme-primary-rgb), 0.16);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.35);
    padding: 2px 7px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gacha-live-pill svg circle {
    animation: gachaLiveDot 1.8s infinite ease-in-out;
}

@keyframes gachaLiveDot {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

.gacha-toggle-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.35;
}

/* Custom Toggle Switch */
.gacha-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.gacha-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gacha-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.22);
    border-radius: 34px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gacha-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gacha-switch input:checked + .gacha-slider {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-hover) 100%);
    border-color: rgba(var(--theme-primary-hover-rgb), 0.65);
    box-shadow: 0 0 16px rgba(var(--theme-primary-rgb), 0.5);
}

.gacha-switch input:checked + .gacha-slider:before {
    transform: translateX(22px);
    background-color: #ffffff;
}

/* Collapsible Details Panel */
.gacha-collapse-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(var(--theme-secondary-rgb), 0.12);
    animation: gachaFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gachaFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wheel Select Dropdown */
.gacha-wheel-select-wrap {
    margin-bottom: 12px;
}

.gacha-select-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 7px;
}

.gacha-select-label svg {
    color: var(--theme-primary-hover);
    flex-shrink: 0;
}

/* Custom Gacha Dropdown (Glassmorphism) */
.gacha-custom-select {
    position: relative;
    width: 100%;
}

.gacha-custom-select-trigger {
    width: 100%;
    min-height: 46px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.18);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    color: #ffffff;
    text-align: left;
}

.gacha-custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(var(--theme-secondary-rgb), 0.35);
}

.gacha-custom-select.is-open .gacha-custom-select-trigger,
.gacha-custom-select-trigger:focus {
    outline: none;
    background: rgba(var(--theme-primary-rgb), 0.12);
    border-color: rgba(var(--theme-primary-rgb), 0.65);
    box-shadow: 0 0 16px rgba(var(--theme-primary-rgb), 0.3);
}

.gacha-custom-select-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.gacha-custom-select .gacha-select-icon {
    color: var(--theme-primary-hover);
    flex-shrink: 0;
}

.gacha-selected-display {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.gacha-selected-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gacha-selected-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 9999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gacha-selected-badge.time {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.gacha-selected-badge.reward {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.15);
    border: 1px solid rgba(244, 114, 182, 0.3);
}

.gacha-selected-cost {
    font-size: 13px;
    font-weight: 800;
    color: #fde047;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.gacha-custom-select .gacha-select-arrow {
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.gacha-custom-select.is-open .gacha-select-arrow {
    transform: rotate(180deg);
    color: var(--theme-primary-hover);
}

/* Dropdown Menu (Glassmorphism Popup) */
.gacha-custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--theme-tint-popup-start) 0%, var(--theme-tint-popup-end) 100%);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.45);
    border-radius: 16px;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(var(--theme-primary-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    z-index: 100;
    overflow: hidden;
    padding: 6px;
    display: none;
    animation: gachaDropdownOpen 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gacha-custom-select.is-open .gacha-custom-dropdown-menu {
    display: block;
}

@keyframes gachaDropdownOpen {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Option Items inside custom dropdown */
.gacha-custom-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid transparent;
}

.gacha-custom-option:hover {
    background: rgba(var(--theme-primary-rgb), 0.16);
    border-color: rgba(var(--theme-primary-rgb), 0.35);
    transform: translateX(2px);
}

.gacha-custom-option.is-selected {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.28) 0%, rgba(var(--theme-primary-active-rgb), 0.18) 100%);
    border-color: rgba(var(--theme-primary-hover-rgb), 0.6);
    box-shadow: 0 0 14px rgba(var(--theme-primary-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.gacha-option-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.gacha-option-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gacha-option-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gacha-option-badge {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gacha-option-badge.time {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.32);
}

.gacha-option-badge.reward {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.14);
    border: 1px solid rgba(244, 114, 182, 0.32);
}

.gacha-option-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.gacha-option-cost {
    font-size: 13.5px;
    font-weight: 800;
    color: #fde047;
    font-family: 'Outfit', sans-serif;
}

.gacha-option-check {
    color: var(--theme-primary-hover);
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(var(--theme-primary-hover-rgb), 0.8));
}

/* Live Calculator Preview Box */
.gacha-calc-preview {
    background: rgba(12, 6, 14, 0.68);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.14);
    border-radius: 16px;
    padding: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 18px rgba(0, 0, 0, 0.24);
}

.gacha-calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.gacha-calc-tag {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--theme-primary-light);
    background: rgba(var(--theme-primary-rgb), 0.16);
    padding: 3px 9px;
    border-radius: 9999px;
    border: 1px solid rgba(var(--theme-primary-rgb), 0.32);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gacha-calc-tag svg {
    color: var(--theme-primary-hover);
    flex-shrink: 0;
}

.gacha-calc-wheel-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gacha-calc-wheel-name svg {
    color: var(--silver, #cbd5e1);
    flex-shrink: 0;
}

.gacha-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.gacha-calc-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.1);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    transition: all 0.25s ease;
}

.gacha-calc-col:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(var(--theme-secondary-rgb), 0.2);
}

.gacha-calc-col-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 4px;
}

.gacha-calc-col-head svg {
    flex-shrink: 0;
}

.gacha-calc-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gacha-calc-val {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
}

/* Primary Highlight micro-card (Lượt quay) */
.gacha-calc-col.highlight {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.22) 0%, rgba(var(--theme-primary-active-rgb), 0.14) 100%);
    border-color: rgba(var(--theme-primary-rgb), 0.48);
    box-shadow: 0 0 16px rgba(var(--theme-primary-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.gacha-calc-col.highlight .gacha-calc-col-head {
    color: var(--theme-primary-light);
}

.gacha-calc-col.highlight .gacha-calc-val {
    color: #ffffff;
    font-size: 16px;
    text-shadow: 0 0 12px rgba(var(--theme-primary-hover-rgb), 0.6);
}

/* Live Explanation / Calculation Banner */
.gacha-calc-expl {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(0, 0, 0, 0.36);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(var(--theme-secondary-rgb), 0.08);
    border-left: 3px solid var(--theme-primary);
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.gacha-expl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--silver, #cbd5e1);
}

.gacha-expl-icon.info {
    color: var(--silver, #cbd5e1);
}

.gacha-expl-icon.success {
    color: var(--theme-primary-hover);
    filter: drop-shadow(0 0 6px rgba(var(--theme-primary-hover-rgb), 0.5));
}

.gacha-expl-icon.warning {
    color: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.gacha-expl-text {
    flex: 1;
}

.gacha-expl-text strong {
    color: #ffffff;
    font-weight: 700;
}

@media (max-width: 480px) {
    .gacha-toggle-card {
        padding: 12px 14px;
    }
    .gacha-calc-grid {
        gap: 6px;
    }
    .gacha-calc-col {
        padding: 8px 4px;
    }
    .gacha-calc-val {
        font-size: 13px;
    }
    .gacha-calc-col.highlight .gacha-calc-val {
        font-size: 14.5px;
    }
    .gacha-calc-header {
        flex-wrap: wrap;
    }
}


