/* ============================================================
   DESIGN SYSTEM — TU TIÊN LỘ
   Dark luxury RPG · Teal accent · Mobile-first
   ============================================================ */

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Core palette */
    --bg: #070b10;
    --surface-1: rgba(12, 18, 28, 0.95);
    --surface-2: rgba(16, 24, 36, 0.9);
    --surface-3: rgba(22, 32, 46, 0.85);

    /* Accent */
    --teal: #66fcf1;
    --teal-dim: #45a29e;
    --teal-glow: rgba(102, 252, 241, 0.18);

    /* Text */
    --tx-hi: #f0f4f8;
    --tx-md: #8fa3b1;
    --tx-lo: rgba(143, 163, 177, 0.45);

    /* Semantic */
    --green: #2ecc71;
    --red: #e74c3c;
    --yellow: #f1c40f;
    --blue: #3498db;
    --purple: #9b59b6;

    /* Surface borders */
    --border: rgba(102, 252, 241, 0.1);
    --border-hi: rgba(102, 252, 241, 0.28);

    /* Radii */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 24px;

    /* Shadows */
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(102, 252, 241, 0.12);

    /* ── Backward-compat aliases (used in inline styles) ── */
    --bg-color: #070b10;
    --card-bg: rgba(16, 24, 36, 0.9);
    --primary: #66fcf1;
    --secondary: #45a29e;
    --text-main: #8fa3b1;
    --text-light: #f0f4f8;
    --border-radius: 12px;
    --btn-blue: linear-gradient(135deg, #1da8b5, #0f7a85);
    --btn-purple: linear-gradient(135deg, #8e44ad, #6c3483);
    --btn-red: linear-gradient(135deg, #c0392b, #96281b);
}

/* ============================================================
   BASE
   ============================================================ */
html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--tx-md);
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--teal);
    text-shadow: 0 0 20px rgba(102, 252, 241, 0.35);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

h2 {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 16px;
}

h3 {
    font-size: 1rem;
}

a {
    color: var(--teal);
    text-decoration: none;
}

/* ============================================================
   GAME CONTAINER
   ============================================================ */
#game-container {
    position: fixed;
    inset: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg);
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
    z-index: 1;
}

/* ============================================================
   SCREENS
   ============================================================ */
.screen {
    display: none;
    position: absolute;
    inset: 0;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    max-width: 360px;
    background: var(--surface-2);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-xl);
    padding: 32px 24px 28px;
    backdrop-filter: blur(16px);
    text-align: center;
    box-shadow: var(--shadow-glow), 0 24px 60px rgba(0, 0, 0, 0.7);
}

.game-logo {
    font-size: 2.2rem;
    color: var(--teal);
    text-shadow: 0 0 30px rgba(102, 252, 241, 0.5);
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.subtitle {
    font-size: 0.78rem;
    color: var(--tx-lo);
    letter-spacing: 0.06em;
    margin-bottom: 28px;
}

/* Auth tabs */
.tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--r-sm);
    padding: 3px;
    margin-bottom: 22px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--tx-md);
    padding: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.03em;
}

.tab-btn.active {
    background: var(--surface-3);
    color: var(--teal);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.12);
}

/* ============================================================
   INPUTS
   ============================================================ */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(102, 252, 241, 0.15);
    border-radius: var(--r-sm);
    background: rgba(0, 0, 0, 0.35);
    color: var(--tx-hi);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

input:focus,
select:focus {
    border-color: var(--teal-dim);
    box-shadow: 0 0 0 3px rgba(102, 252, 241, 0.08);
}

input::placeholder {
    color: var(--tx-lo);
}

select {
    background-image: none;
    cursor: pointer;
}

select option {
    background: #0d1520;
    color: var(--tx-hi);
}

/* ============================================================
   BUTTONS — unified system
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 18px;
    border: none;
    border-radius: var(--r-md);
    color: var(--tx-hi);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    background: linear-gradient(135deg, #1a8a96 0%, #0d6b75 100%);
    border: 1px solid rgba(102, 252, 241, 0.2);
    transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.btn:hover {
    box-shadow: 0 4px 18px rgba(102, 252, 241, 0.22);
    transform: translateY(-1px);
}

.btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Variants */
.btn.primary {
    background: linear-gradient(135deg, #1da8b5 0%, #0f7a85 100%);
    border-color: rgba(102, 252, 241, 0.3);
    box-shadow: 0 2px 12px rgba(102, 252, 241, 0.15);
}

.btn.primary:hover {
    box-shadow: 0 6px 24px rgba(102, 252, 241, 0.3);
}

.bg-red {
    background: linear-gradient(135deg, #c0392b 0%, #96281b 100%);
    border-color: rgba(231, 76, 60, 0.3);
}

.bg-red:hover {
    box-shadow: 0 4px 18px rgba(231, 76, 60, 0.3);
}

.bg-purple {
    background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
    border-color: rgba(155, 89, 182, 0.3);
}

.bg-purple:hover {
    box-shadow: 0 4px 18px rgba(155, 89, 182, 0.3);
}

.bg-blue {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
    border-color: rgba(52, 152, 219, 0.3);
}

.bg-blue:hover {
    box-shadow: 0 4px 18px rgba(52, 152, 219, 0.3);
}

/* Action button (wide CTA) */
.action-btn {
    padding: 13px 18px;
    font-size: 0.95rem;
    border-radius: var(--r-lg);
    letter-spacing: 0.05em;
}

/* ============================================================
   MESSAGES
   ============================================================ */
.msg {
    font-size: 0.8rem;
    color: var(--red);
    margin-top: 10px;
    min-height: 16px;
    text-align: center;
    line-height: 1.4;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    height: 72px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    gap: 12px;
}

/* ── Avatar size tokens ── */
:root {
    --avatar-topbar: 48px;
    /* top bar */
    --avatar-podium: 50px;
    /* podium top-3 */
    --avatar-row: 40px;
    /* ranking table rows */
    /* frame oversize: frame image bleeds beyond avatar circle */
    --frame-bleed: 12px;
}

/* Avatar wrapper — shared base */
.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    cursor: pointer;
    /* default size = top bar */
    width: var(--avatar-topbar);
    height: var(--avatar-topbar);
}

/* Inner container clips the circular photo */
.avatar-frame-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The actual photo — circular, no border (frame provides decoration) */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    z-index: 1;
    transition: filter 0.2s;
}

.avatar-wrapper:hover .avatar-img {
    filter: brightness(1.1);
}

/* Frame overlay — bleeds outside the photo circle */
.avatar-frame-img {
    position: absolute;
    top: calc(-1 * var(--frame-bleed));
    left: calc(-1 * var(--frame-bleed));
    width: calc(100% + var(--frame-bleed) * 2);
    height: calc(100% + var(--frame-bleed) * 2);
    pointer-events: none;
    z-index: 2;
    object-fit: contain;
}

/* Size variants */
.avatar-wrapper--podium {
    width: var(--avatar-podium);
    height: var(--avatar-podium);
}

.avatar-wrapper--row {
    width: var(--avatar-row);
    height: var(--avatar-row);
    cursor: default;
}

.char-brief {
    flex: 1;
    min-width: 0;
}

.char-brief .name {
    font-weight: 700;
    color: var(--tx-hi);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-brief .realm {
    font-size: 0.72rem;
    color: var(--teal-dim);
    letter-spacing: 0.04em;
    margin-top: 1px;
}

.resources {
    font-size: 0.88rem;
    color: var(--yellow);
    font-weight: 700;
    white-space: nowrap;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
#content-area {
    position: absolute;
    top: 72px;
    bottom: 58px;
    left: 0;
    width: 100%;
    overflow-y: auto;
    padding: 16px 14px;
    overscroll-behavior: contain;
}

#content-area::-webkit-scrollbar {
    width: 3px;
}

#content-area::-webkit-scrollbar-track {
    background: transparent;
}

#content-area::-webkit-scrollbar-thumb {
    background: var(--teal-dim);
    border-radius: 3px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabIn 0.3s ease;
}

@keyframes tabIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.cultivation-panel,
.pve-panel,
.pvp-panel,
.character-panel {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px;
    backdrop-filter: blur(8px);
}

/* ============================================================
   CULTIVATION TAB
   ============================================================ */
.exp-progress-container {
    background: rgba(0, 0, 0, 0.4);
    height: 6px;
    border-radius: 99px;
    width: 100%;
    overflow: hidden;
    border: none;
}

.exp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal) 0%, var(--teal-dim) 100%);
    width: 0%;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 8px rgba(102, 252, 241, 0.4);
    border-radius: 99px;
}

.exp-stats-compact {
    display: flex;
    justify-content: space-around;
    padding: 12px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.compact-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.compact-stat span:first-child {
    font-size: 0.62rem;
    color: var(--tx-lo);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.compact-stat span:last-child {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tx-hi);
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    height: 58px;
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.nav-item {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--tx-lo);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 0;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 24px;
    height: 2px;
    background: var(--teal);
    border-radius: 0 0 2px 2px;
    transition: transform 0.2s;
}

.nav-item.active {
    color: var(--teal);
    transform: translateY(-1px);
}

.nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* ============================================================
   COMBAT LOG
   ============================================================ */
.combat-log {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--r-md);
    padding: 10px 12px;
    height: 130px;
    overflow-y: auto;
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--tx-md);
}

.combat-log p {
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ============================================================
   RANKING
   ============================================================ */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-top: 8px;
}

.ranking-table th,
.ranking-table td {
    padding: 10px 12px;
    text-align: center;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ranking-table th {
    background: rgba(102, 252, 241, 0.07);
    color: var(--teal-dim);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ranking-table tr:hover td {
    background: rgba(102, 252, 241, 0.03);
}

/* Podium */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin: 12px 0 20px;
    height: 170px;
}

.podium-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    width: 76px;
}

.podium-slot .avatar-wrapper {
    margin-bottom: -14px;
    z-index: 2;
    width: var(--avatar-podium);
    height: var(--avatar-podium);
    cursor: default;
}

.podium-box {
    width: 100%;
    background: rgba(20, 30, 44, 0.9);
    border: 1px solid var(--teal-dim);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #fff;
    z-index: 1;
    position: relative;
}

.podium-1 {
    order: 2;
}

.podium-1 .podium-box {
    height: 78px;
    border-color: #f1c40f;
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.18) 0%, rgba(0, 0, 0, 0.7) 100%);
    box-shadow: 0 0 14px rgba(241, 196, 15, 0.2);
}

.podium-1 .podium-box::before {
    content: '🥇 1';
    color: #f1c40f;
    font-size: 1.1rem;
}

.podium-2 {
    order: 1;
}

.podium-2 .podium-box {
    height: 52px;
    border-color: #bdc3c7;
    background: linear-gradient(180deg, rgba(189, 195, 199, 0.15) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.podium-2 .podium-box::before {
    content: '🥈 2';
    color: #bdc3c7;
    font-size: 1rem;
}

.podium-3 {
    order: 3;
}

.podium-3 .podium-box {
    height: 38px;
    border-color: #e67e22;
    background: linear-gradient(180deg, rgba(230, 126, 34, 0.15) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.podium-3 .podium-box::before {
    content: '🥉 3';
    color: #e67e22;
    font-size: 0.9rem;
}

.podium-name-container {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-name {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.podium-score {
    font-size: 0.65rem;
    color: var(--tx-lo);
}

/* ============================================================
   PVP
   ============================================================ */
.opponents-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.opponent-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.opponent-card:hover {
    border-color: var(--teal-dim);
    background: var(--surface-3);
}

.opponent-card:active {
    transform: scale(0.98);
}

.opponent-info {
    flex: 1;
    text-align: left;
    margin-left: 12px;
}

.opponent-info h3 {
    font-size: 0.9rem;
    color: var(--tx-hi);
    margin-bottom: 3px;
    font-family: 'Roboto', sans-serif;
    text-shadow: none;
}

.opponent-info p {
    font-size: 0.76rem;
    color: var(--tx-md);
}

.pvp-avatars {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 16px;
}

.pvp-avatars img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--teal-dim);
    object-fit: cover;
}

.opp-avatar img {
    border-color: var(--red);
}

.vs-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--yellow);
    text-shadow: 0 0 12px rgba(241, 196, 15, 0.6);
}

/* ============================================================
   ADMIN TABS
   ============================================================ */
.admin-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--tx-md);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s;
}

.admin-tab-btn.active {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

.admin-panel-content input[type="number"] {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-hi);
    color: var(--tx-hi);
    border-radius: var(--r-sm);
    text-align: center;
}

/* ============================================================
   MODAL BASE
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface-2);
    margin: 10% auto;
    padding: 24px 20px 20px;
    border: 1px solid var(--border-hi);
    border-radius: var(--r-xl);
    width: 92%;
    max-width: 400px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    position: relative;
    color: var(--tx-hi);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close,
.close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--tx-md);
    cursor: pointer;
    transition: color 0.15s;
    background: none;
    border: none;
    z-index: 2;
}

.close:hover,
.close-btn:hover {
    color: var(--teal);
}

/* ============================================================
   DROPDOWN (game-dropdown)
   ============================================================ */
.game-dropdown {
    position: relative;
    user-select: none;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--tx-hi);
    transition: border-color 0.2s;
}

.dropdown-selected:hover {
    border-color: var(--teal-dim);
}

.dropdown-selected .arrow {
    font-size: 0.65rem;
    color: var(--tx-lo);
    transition: transform 0.2s;
}

.game-dropdown.open .arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-1);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    z-index: 500;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.game-dropdown.open .dropdown-options {
    display: block;
}

.dropdown-options .option {
    padding: 10px 14px;
    font-size: 0.84rem;
    color: var(--tx-md);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.dropdown-options .option:hover {
    background: rgba(102, 252, 241, 0.07);
    color: var(--tx-hi);
}

.dropdown-options .option.selected {
    color: var(--teal);
    font-weight: 700;
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */
#confirm-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

#confirm-overlay.active {
    display: flex;
}

#confirm-box {
    background: var(--surface-2);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-xl);
    padding: 28px 22px 22px;
    width: 88%;
    max-width: 340px;
    box-shadow: var(--shadow-glow), 0 24px 60px rgba(0, 0, 0, 0.7);
    text-align: center;
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#confirm-box .confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

#confirm-box h3 {
    font-size: 1.05rem;
    color: var(--teal);
    margin-bottom: 6px;
}

#confirm-box p {
    font-size: 0.84rem;
    color: var(--tx-md);
    line-height: 1.55;
    margin-bottom: 20px;
}

.confirm-preview-img {
    width: 80px;
    height: 100px;
    object-fit: contain;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-hi);
    background: rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto 14px;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
}

.confirm-buttons button {
    flex: 1;
    padding: 11px;
    border-radius: var(--r-md);
    font-size: 0.88rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.15s;
    letter-spacing: 0.02em;
}

.confirm-buttons button:active {
    transform: scale(0.95);
}

.confirm-btn-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: var(--tx-md);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.confirm-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.confirm-btn-ok {
    background: linear-gradient(135deg, #1da8b5, #0f7a85);
    color: #fff;
    border: 1px solid rgba(102, 252, 241, 0.3) !important;
    box-shadow: 0 3px 14px rgba(102, 252, 241, 0.2);
}

.confirm-btn-ok:hover {
    box-shadow: 0 5px 20px rgba(102, 252, 241, 0.35);
}

/* ============================================================
   AVATAR MANAGEMENT
   ============================================================ */
.avatar-mgmt-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 8px 0;
}

.avatar-mgmt-btn {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 10px;
    color: var(--tx-hi);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.avatar-mgmt-btn:hover {
    border-color: var(--teal-dim);
    background: rgba(102, 252, 241, 0.06);
    transform: translateY(-2px);
}

/* Frame grid */
.frames-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
}

.frame-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.frame-item:hover {
    border-color: var(--teal-dim);
}

.frame-item.active {
    border-color: var(--teal);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.2);
}

.frame-item img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 4px;
}

.frame-item .frame-name {
    font-size: 0.68rem;
    color: var(--tx-md);
}

.frame-item .check-icon {
    position: absolute;
    top: 4px;
    right: 6px;
    color: var(--teal);
    font-size: 0.75rem;
    display: none;
}

.frame-item.active .check-icon {
    display: block;
}

/* ============================================================
   MORE MENU — BOTTOM SHEET
   ============================================================ */
.more-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(100%, 480px);
    background: linear-gradient(175deg, #0e1620 0%, #080d14 100%);
    border-top: 1px solid var(--border-hi);
    border-radius: 24px 24px 0 0;
    padding: 12px 20px 32px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.7);
    animation: moreSheetUp 0.36s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
    z-index: 1000;
}

@keyframes moreSheetUp {
    from {
        transform: translateX(-50%) translateY(100%);
    }

    to {
        transform: translateX(-50%) translateY(0);
    }
}

.more-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    margin: 0 auto 18px;
}

.more-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.more-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(102, 252, 241, 0.5);
}

.more-header-icon {
    font-size: 0.65rem;
    color: rgba(102, 252, 241, 0.4);
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.more-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 6px 12px;
    border-radius: var(--r-lg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.more-card:active {
    transform: scale(0.91);
}

.more-card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: inherit;
    pointer-events: none;
}

.more-card:hover .more-card-glow,
.more-card:active .more-card-glow {
    opacity: 1;
}

.more-card-icon {
    font-size: 1.6rem;
    line-height: 1;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    position: relative;
    z-index: 1;
}

.more-card-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(220, 230, 245, 0.7);
    text-align: center;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.more-card-character {
    border-color: rgba(102, 252, 241, 0.18);
}

.more-card-character .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(102, 252, 241, 0.13) 0%, transparent 70%);
}

.more-card-character:hover {
    border-color: rgba(102, 252, 241, 0.45);
    box-shadow: 0 4px 16px rgba(102, 252, 241, 0.12);
}

.more-card-shop {
    border-color: rgba(46, 204, 113, 0.18);
}

.more-card-shop .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(46, 204, 113, 0.14) 0%, transparent 70%);
}

.more-card-shop:hover {
    border-color: rgba(46, 204, 113, 0.45);
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.12);
}

.more-card-pvp {
    border-color: rgba(231, 76, 60, 0.22);
}

.more-card-pvp .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(231, 76, 60, 0.16) 0%, transparent 70%);
}

.more-card-pvp:hover {
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.14);
}

.more-card-rank {
    border-color: rgba(241, 196, 15, 0.2);
}

.more-card-rank .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(241, 196, 15, 0.14) 0%, transparent 70%);
}

.more-card-rank:hover {
    border-color: rgba(241, 196, 15, 0.5);
    box-shadow: 0 4px 16px rgba(241, 196, 15, 0.12);
}

.more-card-talent {
    border-color: rgba(162, 155, 254, 0.22);
}

.more-card-talent .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(162, 155, 254, 0.16) 0%, transparent 70%);
}

.more-card-talent:hover {
    border-color: rgba(162, 155, 254, 0.5);
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.13);
}

.more-card-explore {
    border-color: rgba(116, 185, 255, 0.2);
}

.more-card-explore .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(116, 185, 255, 0.14) 0%, transparent 70%);
}

.more-card-explore:hover {
    border-color: rgba(116, 185, 255, 0.48);
    box-shadow: 0 4px 16px rgba(116, 185, 255, 0.12);
}

.more-card-boss {
    border-color: rgba(255, 118, 117, 0.22);
}

.more-card-boss .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(255, 118, 117, 0.16) 0%, transparent 70%);
}

.more-card-boss:hover {
    border-color: rgba(255, 118, 117, 0.5);
    box-shadow: 0 4px 16px rgba(255, 118, 117, 0.14);
}

.more-card-admin {
    border-color: rgba(178, 190, 195, 0.18);
}

.more-card-admin .more-card-glow {
    background: radial-gradient(circle at 50% 80%, rgba(178, 190, 195, 0.12) 0%, transparent 70%);
}

.more-card-admin:hover {
    border-color: rgba(178, 190, 195, 0.45);
    box-shadow: 0 4px 16px rgba(178, 190, 195, 0.1);
}

.more-card:nth-child(1) {
    animation: cardFadeIn 0.28s 0.08s both;
}

.more-card:nth-child(2) {
    animation: cardFadeIn 0.28s 0.13s both;
}

.more-card:nth-child(3) {
    animation: cardFadeIn 0.28s 0.18s both;
}

.more-card:nth-child(4) {
    animation: cardFadeIn 0.28s 0.22s both;
}

.more-card:nth-child(5) {
    animation: cardFadeIn 0.28s 0.26s both;
}

.more-card:nth-child(6) {
    animation: cardFadeIn 0.28s 0.30s both;
}

.more-card:nth-child(7) {
    animation: cardFadeIn 0.28s 0.34s both;
}

.more-card:nth-child(8) {
    animation: cardFadeIn 0.28s 0.38s both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.more-close-btn {
    width: 100%;
    padding: 11px;
    border-radius: var(--r-md);
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(200, 210, 220, 0.5);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.more-close-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(200, 210, 220, 0.85);
}

/* ============================================================
   EQUIPMENT SLOTS (Tu luyện tab)
   ============================================================ */
.equipment-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 2px;
}

.equip-slot {
    position: relative;
    aspect-ratio: 1/1;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equip-slot.empty {
    cursor: default;
}

.equip-slot.equipped {
    border-color: rgba(102, 252, 241, 0.4);
    background: rgba(102, 252, 241, 0.03);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.1);
}

.equip-slot.equipped:hover {
    border-color: var(--teal);
    box-shadow: 0 0 16px rgba(102, 252, 241, 0.22);
    transform: translateY(-2px);
}

.equip-slot:active {
    transform: scale(0.92);
}

.equip-slot-img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.equip-slot-empty-icon {
    font-size: 1.5rem;
    opacity: 0.16;
    user-select: none;
}

.equip-slot-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.45rem;
    color: var(--tx-lo);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.equip-slot.equipped::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================================
   RARITY FRAME GLOW (Inventory + Equipment Slots)
   ============================================================ */
.rarity-frame {
    border-color: var(--rarity-color, rgba(102, 252, 241, 0.45)) !important;
    animation: rarityRingPulse 1.8s ease-in-out infinite;
}

.rarity-common {
    --rarity-color: #95a5a6;
    --rarity-shadow: rgba(149, 165, 166, 0.30);
}

.rarity-uncommon {
    --rarity-color: #2ecc71;
    --rarity-shadow: rgba(46, 204, 113, 0.35);
}

.rarity-rare {
    --rarity-color: #3498db;
    --rarity-shadow: rgba(52, 152, 219, 0.38);
}

.rarity-epic {
    --rarity-color: #9b59b6;
    --rarity-shadow: rgba(155, 89, 182, 0.40);
}

.rarity-legendary {
    --rarity-color: #f39c12;
    --rarity-shadow: rgba(243, 156, 18, 0.42);
}

.rarity-mythic {
    --rarity-color: #e74c3c;
    --rarity-shadow: rgba(231, 76, 60, 0.45);
}

@keyframes rarityRingPulse {

    0%,
    100% {
        box-shadow: 0 0 6px var(--rarity-shadow);
    }

    50% {
        box-shadow: 0 0 14px var(--rarity-shadow);
    }
}

/* ============================================================
   EQUIP DETAIL POPUP
   ============================================================ */
#equip-detail-overlay,
#item-detail-overlay,
#shop-item-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#equip-detail-overlay.open,
#item-detail-overlay.open,
#shop-item-detail-overlay.open {
    display: flex;
}

.equip-detail-popup {
    background: var(--surface-2);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-xl);
    padding: 22px 18px 18px;
    width: min(86%, 310px);
    box-shadow: var(--shadow-glow), 0 24px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.equip-detail-img-wrap {
    position: relative;
    width: 82px;
    height: 82px;
    background: rgba(102, 252, 241, 0.04);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(102, 252, 241, 0.08);
}

.equip-detail-img-wrap img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.equip-detail-slot-badge {
    font-size: 0.6rem;
    color: var(--tx-lo);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: -6px;
}

.equip-detail-name {
    font-size: 1rem;
    color: var(--teal);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    text-align: center;
    text-shadow: 0 0 12px rgba(102, 252, 241, 0.35);
    line-height: 1.3;
}

.equip-detail-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--r-sm);
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.equip-detail-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
}

.equip-detail-stat-row .stat-label {
    color: var(--tx-md);
}

.equip-detail-stat-row .stat-value {
    font-weight: 700;
}

.equip-detail-stat-row .stat-value.pos {
    color: var(--green);
}

.equip-detail-stat-row .stat-value.zero {
    color: var(--tx-lo);
}

.equip-detail-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.equip-detail-actions .btn-unequip,
.equip-detail-actions .btn-close-popup {
    flex: 1;
    padding: 10px 0;
    border-radius: var(--r-md);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s, transform 0.1s;
    letter-spacing: 0.02em;
}

.equip-detail-actions .btn-unequip:active,
.equip-detail-actions .btn-close-popup:active {
    transform: scale(0.96);
}

.equip-detail-actions .btn-unequip {
    border: 1px solid rgba(231, 76, 60, 0.4);
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.equip-detail-actions .btn-unequip:hover {
    background: rgba(231, 76, 60, 0.22);
}

.equip-detail-actions .btn-close-popup {
    border: 1px solid var(--border-hi);
    background: rgba(102, 252, 241, 0.06);
    color: var(--teal);
}

.equip-detail-actions .btn-close-popup:hover {
    background: rgba(102, 252, 241, 0.13);
}

/* ============================================================
   INVENTORY GRID
   ============================================================ */
.inv-bag-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 2px;
}

.inv-cell {
    position: relative;
    aspect-ratio: 1/1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.inv-cell:active {
    transform: scale(0.91);
}

.inv-cell:hover {
    border-color: rgba(102, 252, 241, 0.35);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.1);
}

.inv-cell.inv-cell-equipped {
    border-color: var(--green);
    background: rgba(46, 204, 113, 0.06);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.14);
}

.inv-cell.inv-cell-owned {
    border-color: rgba(241, 196, 15, 0.35);
    background: rgba(241, 196, 15, 0.04);
    opacity: 0.72;
}

.inv-cell-img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.inv-cell-icon-fallback {
    font-size: 1.5rem;
    line-height: 1;
}

.inv-cell-eq-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    font-size: 0.55rem;
    color: var(--green);
    font-weight: 700;
    text-shadow: 0 0 6px rgba(46, 204, 113, 0.7);
}

.inv-cell-slot {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.44rem;
    color: var(--tx-lo);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.inv-cell-price {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.46rem;
    font-weight: 700;
    color: var(--yellow);
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.rarity-chip {
    display: inline-block;
    margin: 6px 6px 0 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid var(--rarity-color, rgba(255, 255, 255, 0.25));
    color: var(--rarity-color, #cbd5e1);
    background: color-mix(in srgb, var(--rarity-color, #cbd5e1) 16%, transparent);
    box-shadow: 0 0 8px var(--rarity-shadow, rgba(255, 255, 255, 0.12));
}

/* Legacy list (kept for backward compat) */
.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inventory-item {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s;
}

.inventory-item.inv-equipped {
    border-color: var(--green);
    background: rgba(46, 204, 113, 0.05);
}

.inventory-item:hover {
    background: rgba(102, 252, 241, 0.04);
}

.inv-item-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 38px;
    text-align: center;
}

.inv-item-info {
    flex: 1;
    min-width: 0;
}

.inv-item-name {
    font-size: 0.88rem;
    color: var(--tx-hi);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-item-slot {
    font-size: 0.72rem;
    color: var(--teal-dim);
    margin-top: 2px;
}

.inv-item-stats {
    font-size: 0.72rem;
    color: var(--yellow);
    margin-top: 2px;
}

/* ============================================================
   GLOBAL NAME GLOW
   ============================================================ */
.global-name-glow {
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: sweep-color 2.4s linear infinite;
    font-weight: 700;
    display: inline-block;
}

@keyframes sweep-color {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

/* ============================================================
   APPEARANCE / SHOP CARDS
   ============================================================ */
.appearance-card,
.shop-app-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.appearance-card:hover,
.shop-app-card:hover {
    border-color: var(--teal-dim);
    box-shadow: 0 4px 20px rgba(102, 252, 241, 0.1);
    transform: translateY(-2px);
}

.appearance-card:active,
.shop-app-card:active {
    transform: scale(0.97);
}

/* ============================================================
   ADMIN UTILITIES
   ============================================================ */
.admin-search {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-sm);
    color: var(--tx-md);
    margin-bottom: 14px;
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-search:focus {
    border-color: var(--teal-dim);
    box-shadow: 0 0 0 3px rgba(102, 252, 241, 0.07);
    color: var(--tx-hi);
}

.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 8px;
    font-size: 0.8rem;
    color: var(--tx-md);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.bg-glass {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(10px);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 252, 241, 0.25);
    border-radius: 99px;
}

/* Page-info span (pagination) */
.page-info {
    font-size: 0.8rem;
    color: var(--tx-md);
    white-space: nowrap;
}

/* action-btn legacy */
.action-btn {
    border-radius: var(--r-lg);
}

/* ============================================================
   CHAT MODAL
   ============================================================ */
#modal-chat .modal-content {
    background: linear-gradient(135deg, #1e272e 0%, #2f3640 100%);
    border: 1px solid var(--teal-dim);
}