/* ==========================================================================
   DOLPHIN THEME — Đen than / xám đen đậm + điểm nhấn xanh đại dương
   Nạp SAU style-5.0.css và delta.css. Luôn ở chế độ tối.
   Giữ tên biến --kitty-* để không phải sửa HTML/PHP.
   ========================================================================== */
:root,
html,
html[data-theme="dark"],
html[data-theme="light"] {
    color-scheme: dark;

    /* Điểm nhấn: xanh cá heo / đại dương */
    --kitty-pink: #1a9ad0;          /* nút chính, active */
    --kitty-pink-dark: #5cc8f0;     /* chữ nhấn trên nền tối */
    --kitty-pink-light: #8fdcf7;
    --kitty-bow-red: #38bdf8;

    /* Nền than & xám */
    --kitty-pink-bg: #0d0f11;       /* nền trang - đen than */
    --kitty-cream: #17191c;         /* thẻ, panel */
    --kitty-pink-soft: #1f2327;     /* bề mặt phụ */
    --kitty-border: #2a2f34;
    --kitty-border-strong: #3d454d;

    /* Chữ */
    --kitty-text: #e6ebef;
    --kitty-text-muted: #95a1ab;

    --kitty-gold: #fbbf24;
    --kitty-green: #34d399;
    --kitty-blue: #60a5fa;

    --kitty-shadow-sm: 0 4px 14px -2px rgba(0, 0, 0, 0.55);
    --kitty-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
    --kitty-shadow-hover: 0 20px 42px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(26, 154, 208, 0.25);

    /* Biến riêng của theme cá heo */
    --dolphin-deep: #0b3a52;
    --dolphin-sea: #0e8fc4;
    --dolphin-foam: #cfe8f3;
}

/* ---- Nền trang: than đen + ánh nước mờ + sóng đáy ---- */
html body,
html[data-theme="dark"] body {
    background-color: #0d0f11;
    color: var(--kitty-text);
    background-image:
        radial-gradient(ellipse at 10% -10%, rgba(14, 143, 196, 0.16) 0%, transparent 45%),
        radial-gradient(ellipse at 95% 110%, rgba(11, 58, 82, 0.55) 0%, transparent 50%),
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, auto, 22px 22px;
    background-attachment: fixed;
}
html body::after {
    /* Dải sóng mờ dưới đáy màn hình */
    content: "";
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 90px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.35;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C150 10 300 70 450 40 C600 10 750 70 900 40 C1050 10 1150 55 1200 40 L1200 90 L0 90 Z' fill='%230b3a52'/%3E%3Cpath d='M0 60 C200 35 350 85 600 58 C850 32 1000 82 1200 58 L1200 90 L0 90 Z' fill='%23092a3b'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
    animation: dolphinWave 9s ease-in-out infinite alternate;
}
@keyframes dolphinWave {
    from { transform: translateX(0); }
    to { transform: translateX(-2%) scaleX(1.04); }
}

::selection { background: rgba(26, 154, 208, 0.45); color: #fff; }
html ::-webkit-scrollbar-track { background: #111316; }
html ::-webkit-scrollbar-thumb { background: #2f363d; border-radius: 8px; }
html ::-webkit-scrollbar-thumb:hover { background: var(--dolphin-sea); }

/* ---- Header ---- */
html .site-header,
html[data-theme="dark"] .site-header {
    background: rgba(15, 17, 19, 0.9);
    border-bottom: 1px solid var(--kitty-border);
    backdrop-filter: blur(12px);
}
html .brand-avatar-box,
html[data-theme="dark"] .brand-avatar-box {
    background: radial-gradient(circle at 30% 25%, #134a66 0%, #0f1a21 75%);
    border-color: #1f4b62;
    box-shadow: 0 0 0 3px rgba(26, 154, 208, 0.12);
}
html .brand-avatar-box svg { animation: dolphinBob 3.6s ease-in-out infinite; }
@keyframes dolphinBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-2px) rotate(-6deg); }
}
html[data-theme="dark"] .brand-name {
    background: linear-gradient(90deg, #e6ebef 0%, #8fdcf7 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .home-tab-btn.active,
html[data-theme="dark"] .amount-chip.active,
html[data-theme="dark"] .delta-board-tab.active {
    background: linear-gradient(135deg, #0e8fc4 0%, #0b6a93 100%);
    border-color: #0e8fc4;
    color: #fff;
    box-shadow: 0 4px 16px -4px rgba(14, 143, 196, 0.6);
}
html[data-theme="dark"] .nav-link:hover { background: #1f2327; color: #fff; }
html[data-theme="dark"] .mobile-bottom-nav { background: rgba(15, 17, 19, 0.96); }
html[data-theme="dark"] .mobile-dropdown-nav { background: #111316; }
html[data-theme="dark"] .site-footer { background: #0a0b0d; }

/* Ẩn nút đổi sáng/tối: theme cá heo luôn tối */
#themeToggleBtn { display: none !important; }

/* ---- Nút chính: gradient biển ---- */
html .btn-pink,
html[data-theme="dark"] .btn-pink,
html[data-theme="dark"] .mob-nav-center-qr,
.delta-chat-fab .chat-main {
    background: linear-gradient(135deg, #1aa6dd 0%, #0b6a93 100%);
    border-color: #0e8fc4;
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(14, 143, 196, 0.7);
}
html .btn-pink:hover,
html[data-theme="dark"] .btn-pink:hover,
.delta-chat-fab .chat-main:hover {
    background: linear-gradient(135deg, #36b8ea 0%, #0e8fc4 100%);
    border-color: #36b8ea;
}
html[data-theme="dark"] .btn-soft:hover { background: #22272c; }
html[data-theme="dark"] .form-control:focus {
    border-color: var(--dolphin-sea);
    box-shadow: 0 0 0 3px rgba(14, 143, 196, 0.25);
}

/* ---- Thẻ & panel ---- */
html[data-theme="dark"] .kitty-card,
html[data-theme="dark"] .panel-box,
html[data-theme="dark"] .delta-vip,
html[data-theme="dark"] .delta-board,
html[data-theme="dark"] .delta-review,
html[data-theme="dark"] .delta-trust-item,
html[data-theme="dark"] .delta-commit-item {
    background: linear-gradient(180deg, #191c1f 0%, #15171a 100%);
    border-color: var(--kitty-border);
}
html[data-theme="dark"] .kitty-card:hover,
html[data-theme="dark"] .delta-review:hover,
html[data-theme="dark"] .delta-trust-item:hover,
html[data-theme="dark"] .delta-commit-item:hover {
    border-color: rgba(26, 154, 208, 0.55);
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.8), 0 0 18px -6px rgba(14, 143, 196, 0.45);
}

/* ---- Hero trang chủ: biển đêm + cá heo nhảy ---- */
html .delta-hero {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(14, 143, 196, 0.22) 0%, transparent 55%),
        linear-gradient(160deg, #15181b 0%, #101214 55%, #0b2433 100%);
    border-color: #23394a;
}
html .delta-hero::before {
    /* Cá heo nhảy khỏi mặt nước (minh hoạ nền) */
    content: "";
    position: absolute;
    right: 3%; bottom: 8%;
    width: min(320px, 42%);
    aspect-ratio: 1 / 1;
    z-index: 1;
    opacity: 0.16;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M12 70 C20 40 44 22 70 26 C80 28 88 33 94 40 C96 43 94 45 90 44 L82 43 C76 50 64 56 50 58 C36 60 24 64 12 70 Z' fill='%235cc8f0'/%3E%3Cpath d='M50 28 C50 18 55 11 62 8 C60 15 60 22 62 28 Z' fill='%235cc8f0'/%3E%3Cpath d='M14 69 C6 66 2 60 1 54 C6 57 11 61 16 64 Z M14 69 C10 75 9 81 10 87 C14 82 17 77 19 72 Z' fill='%235cc8f0'/%3E%3Cpath d='M0 86 C15 80 30 92 50 86 C70 80 85 92 100 86' stroke='%235cc8f0' stroke-width='2.5' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: dolphinJump 6s ease-in-out infinite;
}
@keyframes dolphinJump {
    0%, 100% { transform: translateY(6px) rotate(4deg); }
    50% { transform: translateY(-8px) rotate(-4deg); }
}
.delta-hero-tag {
    color: #8fdcf7 !important;
    background: rgba(14, 143, 196, 0.14) !important;
    border-color: rgba(14, 143, 196, 0.45) !important;
}
.delta-hero-title .hl,
.delta-vip-title .hl {
    background: linear-gradient(90deg, #5cc8f0, #1a9ad0);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.delta-board-bar i { background: linear-gradient(90deg, #0e8fc4, #5cc8f0); }
.delta-review .av { background: linear-gradient(135deg, #1a9ad0, #0b3a52); }

/* ---- Popup chào mừng ---- */
html[data-theme="dark"] .welcome-popup-banner {
    background: linear-gradient(160deg, #102633 0%, #121518 100%);
}
html .welcome-mascot-ring {
    background: radial-gradient(circle at 30% 25%, #134a66 0%, #0f1a21 80%) !important;
    border-color: #1f4b62 !important;
}

/* ---- Toast & dấu nhấn ---- */
.toast-container .toast-item,
html[data-theme="dark"] .toast-item { border-left-color: var(--dolphin-sea); }

/* Mã QR LUÔN nền trắng để quét được */
.qr-image-frame { background: #fff !important; }

@media (prefers-reduced-motion: reduce) {
    html body::after,
    html .delta-hero::before,
    html .brand-avatar-box svg { animation: none; }
}
