/* Tu Tien Theme - Mystical Cultivation Aesthetic */

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

/* White page variants */
.inventory-white-page::before,
.news-white-page::before {
    display: none;
}

.inventory-white-page .inventory-shell {
    border-color: rgba(142, 202, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(9, 20, 47, 0.84), rgba(4, 10, 26, 0.92)),
        radial-gradient(circle at 50% 0%, rgba(80, 190, 255, 0.13), transparent 45%);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
}

.news-white-page .news-kicker {
    color: #2563eb;
}

.news-white-page .news-page-heading h1 {
    color: #0f172a;
    text-shadow: none;
}

.news-white-page .news-page-heading p {
    color: #64748b;
}

.inventory-white-page .inventory-currencies b {
    border-color: rgba(151, 218, 255, 0.18);
    background: rgba(7, 16, 32, 0.72);
    color: #dbeafe;
}

.inventory-white-page .inventory-currencies span {
    color: #fff4bd;
}

.news-white-page .news-category-tabs a {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #475569;
}

.news-white-page .news-category-tabs a.active,
.news-white-page .news-category-tabs a:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.inventory-white-page .inventory-slot {
    border-color: rgba(151, 218, 255, 0.18);
    background:
        radial-gradient(circle at 50% 38%, rgba(78, 195, 247, 0.12), transparent 54%),
        rgba(5, 14, 36, 0.78);
}

.inventory-white-page .inventory-slot:hover {
    border-color: rgba(246, 231, 165, 0.58);
    box-shadow: 0 0 22px rgba(78, 195, 247, 0.18);
}

.inventory-white-page .inventory-slot > b {
    color: #fff4bd;
}

.inventory-white-page .inventory-slot.empty,
.inventory-white-page .inventory-slot.locked {
    color: #7f8ea3;
}

.inventory-white-page .inventory-quantity,
.inventory-white-page .inventory-market-badge {
    border-color: rgba(246, 231, 165, 0.28);
    background: rgba(4, 10, 26, 0.9);
    color: #fff4bd;
}

.inventory-white-page .inventory-message.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.inventory-white-page .inventory-message.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.inventory-white-page .inventory-empty-filter {
    border-color: #dbeafe;
    background: #f8fafc;
    color: #64748b;
}

.news-white-page .news-list-panel,
.news-white-page .news-detail-card {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1);
}

.news-white-page .news-line-item {
    border-bottom-color: #e2e8f0;
    color: #334155;
}

.news-white-page .news-line-item:hover {
    background: #eff6ff;
    color: #2563eb;
}

.news-white-page .news-line-category {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
}

.news-white-page .news-line-index {
    background: #eff6ff;
    color: #2563eb;
}

.news-white-page .news-line-item time,
.news-white-page .news-empty-state {
    color: #64748b;
}

.news-white-page .news-pagination a,
.news-white-page .news-pagination span span {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #475569;
}

.news-white-page .news-pagination a:hover,
.news-white-page .news-pagination span span {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.news-white-page .news-detail-content,
.news-white-page .news-detail-content :is(h1, h2, h3) {
    color: #0f172a;
}

.news-white-page .news-detail-content p,
.news-white-page .news-detail-content ul,
.news-white-page .news-detail-content ol,
.news-white-page .news-detail-content blockquote {
    color: #334155;
}

.news-white-page .news-detail-content img {
    border-color: #e2e8f0;
}

/* Stored article HTML and Quill-generated cells do not carry utility classes. */
.news-detail-content table,
#news-form .ql-editor table,
#news-table-preview table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    margin: 1rem 0;
}

.news-detail-content :is(td, th),
#news-form .ql-editor :is(td, th),
#news-table-preview :is(td, th) {
    min-width: 8rem;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 0.85rem;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.news-detail-content th,
.news-detail-content table > tbody:first-child > tr:first-child > td {
    background: #fef3c7;
    color: #78350f;
    font-weight: 700;
}

.news-detail-content tbody tr:nth-child(even) {
    background: #f8fafc;
}

#news-form .ql-editor :is(td, th),
#news-table-preview :is(td, th) {
    border-color: rgba(212, 175, 55, 0.4);
}

#news-form .ql-editor tr:first-child,
#news-table-preview tr:first-child {
    background: rgba(212, 175, 55, 0.15);
    color: #f0d878;
    font-weight: 700;
}

#news-form .ql-editor tr:nth-child(even),
#news-table-preview tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}
::-webkit-scrollbar-track {
    background: #0a0a0f;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af37, #8a6d1f);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f0d878, #d4af37);
}

/* Selection */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #f0d878;
}




/* Body gradient overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(79, 195, 247, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.home-page-body {
    position: relative;
    overflow-x: hidden;
    background: #ffffff;
    background-image: none;
}

.home-page-body::before {
    display: none;
}

.account-menu.open .account-dropdown,
.account-menu:focus-within .account-dropdown {
    display: block;
}

.navbar-logo-link {
    /* Mobile logo tuning */
    --navbar-logo-width: 86px;
    --navbar-logo-top: 6px;
    position: relative;
    display: block;
    width: var(--navbar-logo-width);
    height: 64px;
    overflow: visible;
    transition: opacity 0.2s ease;
}

.navbar-logo-link:hover {
    opacity: 0.9;
}

.navbar-logo-mark {
    position: absolute;
    left: 0;
    top: var(--navbar-logo-top);
    width: var(--navbar-logo-width);
    height: auto;
    max-width: none;
    object-fit: contain;
}

@media (min-width: 640px) {
    .navbar-logo-link {
        /* Desktop logo tuning */
        --navbar-logo-width: 166px;
        --navbar-logo-top: 2px;
    }
}

/* Gold glow text */
.text-glow-gold {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
}

.text-glow-accent {
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.5), 0 0 20px rgba(79, 195, 247, 0.3);
}

/* Card styles */
.tu-card {
    background: linear-gradient(135deg, rgba(21, 21, 32, 0.9), rgba(30, 30, 46, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tu-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
}

/* Stat card */
.stat-card {
    background: linear-gradient(135deg, rgba(21, 21, 32, 0.95), rgba(30, 30, 46, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    opacity: 0.5;
}

/* Progress bar */
.tu-progress {
    background: rgba(10, 10, 15, 0.8);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.tu-progress-fill {
    background: linear-gradient(90deg, #8a6d1f, #d4af37, #f0d878);
    border-radius: 999px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Button styles */
.tu-btn {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(138, 109, 31, 0.1));
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tu-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(138, 109, 31, 0.2));
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.tu-btn-primary {
    background: linear-gradient(135deg, #d4af37, #8a6d1f);
    color: #0a0a0f;
    border: none;
    font-weight: 600;
}

.tu-btn-primary:hover {
    background: linear-gradient(135deg, #f0d878, #d4af37);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

/* Rarity colors */
.rarity-common { color: #9e9e9e; }
.rarity-uncommon { color: #66bb6a; }
.rarity-rare { color: #42a5f5; }
.rarity-epic { color: #ab47bc; }
.rarity-legendary { color: #ffa726; }
.rarity-mythic {
    color: #ef5350;
    animation: mythic-glow 2s ease-in-out infinite;
}

@keyframes mythic-glow {
    0%, 100% { text-shadow: 0 0 5px rgba(239, 83, 80, 0.5); }
    50% { text-shadow: 0 0 20px rgba(239, 83, 80, 0.8), 0 0 30px rgba(239, 83, 80, 0.4); }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse glow */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.2); }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Shimmer effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Border gradient */
.border-gradient-gold {
    border: 1px solid transparent;
    background: linear-gradient(#151520, #151520) padding-box,
                linear-gradient(135deg, #d4af37, transparent, #8a6d1f) border-box;
}

/* Realm badge */
.realm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(138, 109, 31, 0.1));
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: #f0d878;
}

/* Item slot */
.item-slot {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(21, 21, 32, 0.9), rgba(30, 30, 46, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.item-slot:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.item-slot.equipped {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
}

/* Homepage game landing */
.home-page {
    padding-top: 4rem;
    min-height: 100vh;
}

.home-hero {
    min-height: clamp(760px, 73vh, 820px);
    display: flex;
    align-items: center;
    padding: 2rem 1rem 1rem;
}

.home-hero-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
}

.home-hero-copy {
    width: min(620px, 100%);
    padding-top: 1.5rem;
}

.home-logo-mark {
    display: inline-grid;
    position: relative;
    margin-bottom: 1.1rem;
    color: #ffffff;
    text-shadow: 0 0 18px rgba(126, 197, 255, 0.62), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.home-logo-mark span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.home-logo-mark strong {
    font-family: Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 0.9;
    color: #f7fbff;
}

.home-logo-mark em {
    position: absolute;
    right: -2.3rem;
    top: 1.7rem;
    writing-mode: vertical-rl;
    padding: 0.3rem 0.18rem;
    border-radius: 4px;
    background: #b7222a;
    color: #fff;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.home-hero-copy h1 {
    margin: 0;
    font-family: Georgia, serif;
    color: #15235a;
    font-size: clamp(3rem, 7vw, 6.2rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 0;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(18, 43, 93, 0.28);
}

.home-hero-copy h1 span {
    display: block;
}

.home-slogan {
    width: fit-content;
    margin: 1.3rem 0 1.35rem;
    padding: 0.45rem 2.1rem;
    border: 1px solid rgba(178, 213, 255, 0.5);
    background: linear-gradient(90deg, rgba(14, 42, 94, 0.9), rgba(32, 76, 141, 0.92), rgba(14, 42, 94, 0.9));
    color: #eaf6ff;
    font-weight: 900;
    font-size: clamp(1rem, 2vw, 1.35rem);
    letter-spacing: 0.02em;
    box-shadow: 0 0 18px rgba(73, 176, 255, 0.28);
}

.home-quick-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 2rem;
}

.home-quick-features div {
    min-height: 4.6rem;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.55rem;
    padding: 0.55rem;
    border-radius: 6px;
    border: 1px solid rgba(123, 176, 239, 0.25);
    background: rgba(233, 244, 255, 0.42);
    color: #102756;
    box-shadow: 0 7px 20px rgba(31, 76, 138, 0.12);
}

.home-quick-features b {
    grid-row: span 2;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #eaf8ff;
    background: linear-gradient(180deg, #315c99, #12295a);
    box-shadow: 0 0 14px rgba(72, 171, 255, 0.28);
}

.home-quick-features span {
    font-weight: 900;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.home-quick-features small {
    color: #23406c;
    font-size: 0.68rem;
    font-weight: 700;
}

.home-play-button {
    position: relative;
    display: inline-flex;
    min-width: min(320px, 100%);
    min-height: 4rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid rgba(151, 98, 25, 0.58);
    background: linear-gradient(180deg, #fff1bd 0%, #e0aa44 53%, #bb7a20 100%);
    color: #5a2e09;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(67, 36, 8, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.72);
}

.home-play-button::before,
.home-play-button::after {
    content: '✦';
    position: absolute;
    color: #fff3bd;
    text-shadow: 0 0 8px rgba(255, 246, 192, 0.7);
}

.home-play-button::before {
    left: 1.6rem;
}

.home-play-button::after {
    right: 1.6rem;
}

.home-platforms {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0.7rem 0 0 5.4rem;
    color: #132a56;
    font-weight: 900;
}

.home-platforms span {
    font-size: 0.82rem;
}

.home-platforms b {
    font-size: 0.78rem;
    color: #0c1a36;
}

.home-gift-banner {
    width: 106px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.2rem 0.75rem;
    border: 1px solid rgba(247, 219, 135, 0.76);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(14, 38, 87, 0.95), rgba(7, 18, 49, 0.94));
    color: #ffe99b;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 0 24px rgba(247, 199, 75, 0.2), inset 0 0 30px rgba(75, 152, 255, 0.12);
}

.home-gift-banner b {
    margin-top: 0.65rem;
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #6a3307;
    background: radial-gradient(circle, #fff0a8, #f0a52c 62%, #9c4a0f);
    box-shadow: 0 0 18px rgba(255, 196, 54, 0.62);
}

.home-dashboard {
    width: min(1180px, calc(100% - 2rem));
    margin: 3.3rem auto 0;
    display: grid;
    grid-template-columns: 1.08fr 0.82fr 0.92fr;
    gap: 1rem;
}

.home-ornate-panel {
    position: relative;
    min-height: 250px;
    padding: 1.3rem;
}

.home-ornate-panel::before,
.home-ornate-panel::after {
    content: '';
    position: absolute;
    width: 2.1rem;
    height: 2.1rem;
    pointer-events: none;
}

.home-ornate-panel::before {
    left: 0.45rem;
    top: 0.45rem;
}

.home-ornate-panel::after {
    right: 0.45rem;
    bottom: 0.45rem;
}

.home-ornate-panel h2 {
    margin: 0 0 1.1rem;
    text-align: center;
    color: #f6e7a5;
    font-size: 1.15rem;
    font-weight: 900;
}

.home-feature-content {
    display: grid;
    grid-template-columns: 37% 1fr;
    gap: 1rem;
    align-items: center;
}

.home-feature-visual {
    min-height: 185px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(113, 183, 255, 0.18);
    background: radial-gradient(circle, rgba(112, 205, 255, 0.3), rgba(10, 27, 68, 0.5) 54%, rgba(5, 14, 36, 0.95));
    color: rgba(203, 238, 255, 0.75);
    font-size: 4.5rem;
    text-shadow: 0 0 22px rgba(91, 190, 255, 0.72);
}

.home-feature-list {
    display: grid;
    gap: 0.7rem;
}

.home-feature-list div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.7rem;
    align-items: center;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(155, 190, 255, 0.12);
}

.home-feature-list b {
    grid-row: span 2;
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(94, 169, 255, 0.24), rgba(12, 33, 77, 0.92));
    color: #bdefff;
    border: 1px solid rgba(144, 211, 255, 0.24);
}

.home-feature-list span {
    color: #fff;
    font-weight: 900;
    font-size: 0.88rem;
    text-transform: uppercase;
}

.home-feature-list small {
    color: #b8c7da;
    font-size: 0.82rem;
}

.home-feature-panel.image-backed {
    overflow: hidden;
}

.home-feature-art {
    /* Chỉnh ảnh tính năng: width = rộng ảnh, x/y = trái-phải/lên-xuống. */
    --feature-art-width: 45%;
    --feature-art-x: 10%;
    --feature-art-y: 52%;
    position: relative;
    min-height: 230px;
    display: grid;
    grid-template-columns: var(--feature-art-width) minmax(0, 1fr);
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
}

.home-feature-art img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    display: block;
    object-fit: cover;
    object-position: var(--feature-art-x) var(--feature-art-y);
    filter: saturate(1.16) contrast(1.08) brightness(1.12);
}

.home-feature-art::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-feature-intro {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    background: rgba(5, 14, 36, 0.44);
}

.home-feature-intro div {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr);
    align-items: start;
    column-gap: 0.55rem;
    min-height: 2.55rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(155, 190, 255, 0.13);
    color: #eaf7ff;
}

.home-feature-intro div:last-child {
    border-bottom: 0;
}

.home-feature-intro b {
    grid-row: span 2;
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0, 88% 20%, 88% 80%, 50% 100%, 12% 80%, 12% 20%);
    border: 1px solid rgba(246, 231, 165, 0.36);
    background: radial-gradient(circle, rgba(126, 222, 255, 0.3), rgba(18, 48, 99, 0.86));
    color: #bdefff;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(91, 190, 255, 0.62);
}

.home-feature-intro span {
    min-width: 0;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.home-feature-intro small {
    color: #c3d3e7;
    font-size: 0.74rem;
    line-height: 1.25;
}

.home-rank-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 0.7rem;
    border-bottom: 1px solid rgba(155, 190, 255, 0.12);
}

.home-rank-tabs span,
.home-rank-tabs a,
.home-rank-tabs button {
    padding-bottom: 0.65rem;
    text-align: center;
    color: #aebbd3;
    font-size: 0.82rem;
    font-weight: 800;
}

.home-rank-tabs .active,
.home-rank-tabs a:hover,
.home-rank-tabs button:hover {
    color: #f6e7a5;
}

.home-rank-tabs button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.home-rank-list {
    display: grid;
    gap: 0.55rem;
}

.home-rank-list div {
    display: grid;
    grid-template-columns: 1.6rem 1.9rem minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    color: #dce9ff;
}

.home-rank-no {
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(240, 216, 120, 0.14);
    color: #f6e7a5;
    font-size: 0.78rem;
    font-weight: 900;
}

.home-rank-list img,
.home-rank-list i {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    border: 1px solid rgba(155, 190, 255, 0.26);
}

.home-rank-list i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #102858;
    color: #f6e7a5;
    font-style: normal;
    font-weight: 900;
}

.home-rank-list b,
.home-rank-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-rank-list b {
    color: #fff;
    font-size: 0.9rem;
}

.home-rank-list strong {
    color: #ffe083;
    font-size: 0.9rem;
}

.home-news-compact {
    display: grid;
    gap: 0.7rem;
}

.home-news-compact a {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    min-height: 4rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(155, 190, 255, 0.12);
}

.home-news-compact img,
.home-news-compact > a > span {
    width: 5.4rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(155, 190, 255, 0.2);
}

.home-news-compact > a > span {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(72, 151, 255, 0.16);
    color: #bdefff;
    font-size: 1.5rem;
}

.home-news-compact em {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    color: #fff;
    background: rgba(78, 195, 247, 0.28);
    font-size: 0.63rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.home-news-compact b {
    display: block;
    color: #fff;
    line-height: 1.2;
    font-size: 0.9rem;
}

.home-news-compact time {
    color: #b8c7da;
    font-size: 0.78rem;
    white-space: nowrap;
}

.home-small-button {
    position: relative;
    z-index: 2;
    display: flex;
    width: fit-content;
    min-width: 8rem;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    margin: 0.9rem auto 0;
    border-radius: 999px;
    border: 1px solid rgba(240, 216, 120, 0.32);
    background: linear-gradient(180deg, rgba(240, 216, 120, 0.18), rgba(97, 65, 19, 0.36));
    color: #f6e7a5;
    font-size: 0.78rem;
    font-weight: 900;
}

.home-rank-button {
    min-width: min(100%, 13rem);
    min-height: 2.45rem;
    padding: 0 1rem;
    letter-spacing: 0;
}

.home-empty-row {
    min-height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.home-realm-road {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    align-items: start;
    gap: 0.4rem;
    position: relative;
}

.home-realm-road::before {
    content: '';
    position: absolute;
    left: 5%;
    right: 5%;
    top: 2.15rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cbd5e1, #3b82f6, #22c55e, #facc15, #f97316, #d946ef, #67e8f9, #a78bfa, #fde68a, transparent);
    box-shadow: 0 0 16px rgba(111, 205, 255, 0.45);
}

.home-realm-road div {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    color: #dbeafe;
}

.home-realm-road span {
    width: 4.6rem;
    height: 4.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.home-realm-road span img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
}

.home-realm-road b {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.home-realm-road .realm-luyen-khi b {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.home-realm-road .realm-truc-co b {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.home-realm-road .realm-kim-dan b {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.home-realm-road .realm-nguyen-anh b {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.home-realm-road .realm-hoa-than b {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.home-realm-road .realm-luyen-hu b {
    border-color: #f5d0fe;
    background: #fdf4ff;
    color: #a21caf;
}

.home-realm-road .realm-hop-the b {
    border-color: #a5f3fc;
    background: linear-gradient(90deg, #ecfeff, #f5f3ff);
    color: #0f766e;
}

.home-realm-road .realm-dai-thua b {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}

.home-realm-road .realm-do-kiep b {
    border-color: #ddd6fe;
    background: #f5f3ff;
    color: #6d28d9;
}

.home-realm-road .realm-phi-thang b {
    border-color: #fde68a;
    background: linear-gradient(90deg, #ffffff, #fffbeb);
    color: #b45309;
}

.home-top-button {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 40;
    width: 3.3rem;
    height: 3.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(240, 216, 120, 0.46);
    background: rgba(12, 25, 55, 0.9);
    color: #f6e7a5;
    font-weight: 900;
    font-size: 0.78rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.32);
}

.quick-action-dock {
    position: fixed;
    right: 1rem;
    top: 700%;
    z-index: 45;
    display: grid;
    gap: 0.45rem;
    transform: translateY(-50%);
}

.quick-action-dock a {
    position: relative;
    width: 2.85rem;
    height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(246, 231, 165, 0.42);
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 245, 186, 0.28), transparent 36%),
        linear-gradient(180deg, rgba(13, 34, 76, 0.95), rgba(5, 12, 31, 0.95));
    color: #fff4bd;
    box-shadow:
        0 0 16px rgba(78, 195, 247, 0.18),
        inset 0 0 12px rgba(78, 195, 247, 0.12);
}

.quick-action-dock a:hover,
.quick-action-dock a.active {
    border-color: rgba(255, 231, 132, 0.8);
    color: #ffffff;
    transform: translateX(-3px);
    box-shadow:
        0 0 22px rgba(246, 231, 165, 0.32),
        inset 0 0 14px rgba(78, 195, 247, 0.18);
}

.quick-action-dock span {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.quick-action-dock b {
    position: absolute;
    right: calc(100% + 0.55rem);
    top: 50%;
    min-width: max-content;
    padding: 0.28rem 0.55rem;
    border-radius: 5px;
    border: 1px solid rgba(151, 218, 255, 0.26);
    background: rgba(7, 16, 32, 0.92);
    color: #dff6ff;
    font-size: 0.75rem;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translate(0.2rem, -50%);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.quick-action-dock a:hover b {
    opacity: 1;
    transform: translate(0, -50%);
}

.feature-page {
    min-height: 100vh;
}

.feature-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem;
    border: 1px solid rgba(142, 202, 255, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(9, 20, 47, 0.82), rgba(4, 10, 26, 0.9)),
        radial-gradient(circle at 50% 0%, rgba(80, 190, 255, 0.13), transparent 45%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.feature-heading {
    text-align: center;
    margin-bottom: 1.5rem;
}

.feature-heading span {
    color: #aeeeff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.feature-heading h1 {
    margin: 0.25rem 0 0.45rem;
    color: #fff4bd;
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 900;
    text-shadow: 0 0 20px rgba(78, 195, 247, 0.35);
}

.feature-heading p {
    color: #c9d7e8;
    font-size: 0.98rem;
}

.feature-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
}

.feature-tabs span,
.feature-tabs button {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.28);
    background: rgba(7, 16, 32, 0.66);
    color: #fff4bd;
    font-size: 0.84rem;
    font-weight: 800;
}

.feature-tabs button {
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.feature-tabs button:hover,
.feature-tabs button.active {
    border-color: rgba(246, 231, 165, 0.72);
    background: rgba(246, 231, 165, 0.18);
    transform: translateY(-1px);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.9rem;
}

.feature-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-grid.boss {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card {
    display: grid;
    grid-template-columns: 4.3rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(151, 218, 255, 0.18);
    background: rgba(5, 14, 36, 0.74);
}

.feature-card img,
.feature-fallback {
    width: 4.3rem;
    height: 4.3rem;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(246, 231, 165, 0.24);
}

.feature-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(91, 190, 255, 0.26), rgba(10, 27, 68, 0.88));
    color: #fff4bd;
    font-size: 1.6rem;
    font-weight: 900;
}

.feature-card small {
    display: block;
    color: #94dfff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.feature-card h2 {
    margin: 0.12rem 0;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.25;
}

.feature-card p {
    color: #c9d7e8;
    font-size: 0.88rem;
}

.feature-card b,
.feature-card strong {
    color: #ffe083;
}

.feature-card button {
    grid-column: 1 / -1;
    min-height: 2.15rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.28);
    background: rgba(246, 231, 165, 0.12);
    color: #fff4bd;
    font-size: 0.82rem;
    font-weight: 900;
}

.feature-card button:not(:disabled) {
    cursor: pointer;
}

.feature-card button:not(:disabled):hover {
    background: rgba(246, 231, 165, 0.22);
    border-color: rgba(246, 231, 165, 0.58);
}

.feature-card button:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.market-tab-panel {
    display: none;
}

.market-tab-panel.active {
    display: block;
}

.market-list-card {
    align-items: start;
}

.market-list-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(4.5rem, 0.6fr) minmax(5.5rem, 1fr);
    gap: 0.55rem;
}

.market-list-form input {
    width: 100%;
    min-height: 2.15rem;
    border-radius: 999px;
    border: 1px solid rgba(151, 218, 255, 0.22);
    background: rgba(3, 10, 27, 0.7);
    color: #fff4bd;
    padding: 0 0.85rem;
    font-weight: 800;
    outline: none;
}

.market-list-form input:focus {
    border-color: rgba(246, 231, 165, 0.58);
    box-shadow: 0 0 0 2px rgba(246, 231, 165, 0.12);
}

.market-list-form button {
    grid-column: 1 / -1;
}

.feature-subtitle {
    margin: 1.6rem 0 0.85rem;
    color: #fff4bd;
    font-size: 1.15rem;
    font-weight: 900;
    text-align: center;
}

.feature-list {
    display: grid;
    gap: 0.65rem;
}

.feature-list article {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(151, 218, 255, 0.16);
    background: rgba(7, 16, 32, 0.62);
}

.feature-list article > span {
    min-height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(246, 231, 165, 0.28);
    color: #ffe083;
    font-weight: 900;
}

.feature-list b {
    display: block;
    color: #ffffff;
    font-size: 1rem;
}

.feature-list small,
.feature-list p {
    color: #c9d7e8;
    font-size: 0.86rem;
}

.site-page {
    min-height: 100vh;
}

.site-shell,
.donate-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    border: 1px solid rgba(142, 202, 255, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(9, 20, 47, 0.84), rgba(4, 10, 26, 0.92)),
        radial-gradient(circle at 50% 0%, rgba(80, 190, 255, 0.13), transparent 45%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.site-shell {
    padding: 1.5rem;
}

.site-heading {
    text-align: center;
    margin-bottom: 1.5rem;
}

.site-heading span,
.donate-panel > span {
    color: #aeeeff;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.site-heading h1,
.donate-panel h1 {
    margin: 0.25rem 0 0.45rem;
    color: #fff4bd;
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 900;
    text-shadow: 0 0 20px rgba(78, 195, 247, 0.35);
}

.site-heading p,
.donate-panel p {
    color: #c9d7e8;
}

.guide-steps,
.feature-overview-grid,
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
}

.guide-steps article,
.feature-overview-grid a,
.community-grid article,
.community-rules {
    border: 1px solid rgba(151, 218, 255, 0.18);
    border-radius: 8px;
    background: rgba(5, 14, 36, 0.72);
    padding: 1rem;
}

.guide-steps b,
.community-grid b,
.feature-overview-grid b {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    border-radius: 50%;
    border: 1px solid rgba(246, 231, 165, 0.32);
    background: radial-gradient(circle, rgba(246, 231, 165, 0.22), rgba(18, 48, 99, 0.86));
    color: #fff4bd;
    font-size: 1.15rem;
    font-weight: 900;
}

.guide-steps h2,
.community-grid h2,
.community-rules h2 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
}

.feature-overview-grid span {
    display: block;
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
}

.guide-steps p,
.feature-overview-grid small,
.community-grid p,
.community-rules span {
    display: block;
    color: #c9d7e8;
    line-height: 1.45;
}

.guide-steps a,
.community-grid a {
    display: inline-flex;
    margin-top: 0.8rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.3);
    color: #fff4bd;
    font-weight: 900;
    font-size: 0.84rem;
}

.community-rules {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.45rem;
}

.donate-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    overflow: hidden;
}

.donate-art {
    min-height: 560px;
    background: #071020;
}

.donate-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.donate-panel {
    padding: 2rem;
    display: grid;
    align-content: center;
    background: rgba(5, 14, 36, 0.84);
    border-left: 1px solid rgba(151, 218, 255, 0.16);
}

.donate-packages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 1.2rem 0;
}

.donate-packages button {
    min-height: 4.5rem;
    border-radius: 8px;
    border: 1px solid rgba(246, 231, 165, 0.26);
    background: rgba(7, 16, 32, 0.78);
    color: #fff4bd;
    font-size: 1.1rem;
    font-weight: 900;
}

.donate-packages button.active,
.donate-packages button:hover {
    border-color: rgba(255, 231, 132, 0.72);
    background: rgba(246, 231, 165, 0.14);
}

.donate-packages small {
    display: block;
    margin-top: 0.25rem;
    color: #aeeeff;
    font-size: 0.8rem;
}

.donate-form {
    display: grid;
    gap: 0.75rem;
}

.donate-form label {
    display: grid;
    gap: 0.35rem;
}

.donate-form span {
    color: #c9d7e8;
    font-size: 0.85rem;
    font-weight: 800;
}

.donate-form input {
    min-height: 2.8rem;
    border-radius: 7px;
    border: 1px solid rgba(151, 218, 255, 0.22);
    background: rgba(7, 16, 32, 0.9);
    color: #ffffff;
    padding: 0 0.8rem;
}

.donate-form button {
    min-height: 3rem;
    border-radius: 999px;
    border: 1px solid rgba(151, 98, 25, 0.58);
    background: linear-gradient(180deg, #fff1bd 0%, #e0aa44 53%, #bb7a20 100%);
    color: #4a2b0a;
    font-weight: 900;
}

.donate-result {
    margin-top: 0.9rem;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(102, 187, 106, 0.28);
    background: rgba(102, 187, 106, 0.1);
    color: #d9ffe0;
    line-height: 1.4;
}

.leaderboard-shell {
    overflow: hidden;
}

.leaderboard-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.leaderboard-podium article {
    min-height: 11rem;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(151, 218, 255, 0.18);
    border-radius: 8px;
    background: rgba(5, 14, 36, 0.72);
}

.leaderboard-podium article.first {
    min-height: 13rem;
    border-color: rgba(246, 231, 165, 0.38);
    background: rgba(246, 231, 165, 0.08);
}

.leaderboard-podium i {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(246, 231, 165, 0.16);
    color: #fff4bd;
    font-style: normal;
    font-weight: 900;
}

.leaderboard-podium img {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(151, 218, 255, 0.24);
}

.leaderboard-podium b {
    color: #ffffff;
    font-weight: 900;
}

.leaderboard-podium span {
    color: #c9d7e8;
    font-size: 0.86rem;
}

.leaderboard-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.leaderboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.leaderboard-tabs button,
.leaderboard-pagination button {
    min-height: 2.4rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.26);
    background: rgba(7, 16, 32, 0.74);
    color: #c9d7e8;
    font-weight: 900;
}

.leaderboard-tabs button.active,
.leaderboard-tabs button:hover,
.leaderboard-pagination button:hover:not(:disabled) {
    color: #fff4bd;
    border-color: rgba(246, 231, 165, 0.58);
    background: rgba(246, 231, 165, 0.12);
}

.leaderboard-pagination button:disabled {
    opacity: 0.45;
}

#rank-search {
    min-height: 2.6rem;
    width: min(18rem, 100%);
    border-radius: 999px;
    border: 1px solid rgba(151, 218, 255, 0.22);
    background: rgba(7, 16, 32, 0.86);
    color: #ffffff;
    padding: 0 0.95rem;
}

.leaderboard-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(151, 218, 255, 0.15);
    border-radius: 8px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(151, 218, 255, 0.1);
    color: #dbeafe;
    text-align: left;
}

.leaderboard-table th {
    color: #fff4bd;
    background: rgba(7, 16, 32, 0.72);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.leaderboard-table tr:hover td {
    background: rgba(78, 195, 247, 0.06);
}

.rank-index {
    color: #ffe083 !important;
    font-weight: 900;
}

.rank-player {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.rank-player img,
.rank-player i {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid rgba(151, 218, 255, 0.22);
}

.rank-player i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(246, 231, 165, 0.14);
    color: #fff4bd;
    font-style: normal;
    font-weight: 900;
}

.leaderboard-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
    color: #c9d7e8;
}

.leaderboard-pagination div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.leaderboard-pagination b {
    color: #fff4bd;
}

.inventory-page {
    min-height: 100vh;
}

.inventory-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.2rem;
    border: 1px solid rgba(142, 202, 255, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(9, 20, 47, 0.84), rgba(4, 10, 26, 0.92)),
        radial-gradient(circle at 50% 0%, rgba(80, 190, 255, 0.13), transparent 45%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.inventory-heading,
.inventory-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.inventory-heading {
    margin-bottom: 1rem;
}

.inventory-heading span {
    color: #aeeeff;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.inventory-heading h1 {
    margin: 0.2rem 0;
    color: #fff4bd;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    text-shadow: 0 0 20px rgba(78, 195, 247, 0.35);
}

.inventory-heading p,
.inventory-slots-summary {
    color: #c9d7e8;
}

.inventory-currencies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.inventory-currencies b {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(151, 218, 255, 0.18);
    background: rgba(7, 16, 32, 0.72);
    color: #dbeafe;
}

.inventory-currencies span {
    color: #fff4bd;
}

.inventory-message {
    margin-bottom: 0.8rem;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
}

.inventory-message.success {
    border: 1px solid rgba(102, 187, 106, 0.28);
    background: rgba(102, 187, 106, 0.1);
    color: #d9ffe0;
}

.inventory-message.error {
    border: 1px solid rgba(239, 83, 80, 0.28);
    background: rgba(239, 83, 80, 0.1);
    color: #ffd6d6;
}

.inventory-toolbar {
    margin-bottom: 1rem;
}

.inventory-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inventory-tabs button {
    min-height: 2.35rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.26);
    background: rgba(7, 16, 32, 0.74);
    color: #c9d7e8;
    font-weight: 900;
}

.inventory-tabs button.active,
.inventory-tabs button:hover {
    color: #fff4bd;
    border-color: rgba(246, 231, 165, 0.58);
    background: rgba(246, 231, 165, 0.12);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.85rem;
    align-items: start;
}

.inventory-slot {
    position: relative;
    aspect-ratio: 1;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(151, 218, 255, 0.18);
    background:
        radial-gradient(circle at 50% 38%, rgba(78, 195, 247, 0.12), transparent 54%),
        rgba(5, 14, 36, 0.78);
}

.inventory-slot:hover {
    z-index: 30;
    border-color: rgba(246, 231, 165, 0.58);
    box-shadow: 0 0 22px rgba(78, 195, 247, 0.18);
}

.inventory-slot img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(246, 231, 165, 0.22));
}

.inventory-slot > b {
    color: #fff4bd;
    font-size: 1.4rem;
}

.inventory-quantity {
    position: absolute;
    right: 0.35rem;
    top: 0.35rem;
    min-width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.28);
    background: rgba(4, 10, 26, 0.9);
    color: #fff4bd;
    font-size: 0.75rem;
    font-weight: 900;
}

.inventory-market-badge {
    position: absolute;
    left: 0.35rem;
    top: 0.35rem;
    z-index: 2;
    border-radius: 999px;
    border: 1px solid rgba(246, 231, 165, 0.45);
    background: rgba(5, 14, 36, 0.88);
    color: #fff4bd;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 0.08rem 0.38rem;
}

.inventory-slot.empty,
.inventory-slot.locked {
    border-style: dashed;
    color: #7f8ea3;
}

.inventory-slot.locked {
    opacity: 0.55;
}

.inventory-use-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 60;
    display: none;
    width: 156px;
    transform: translateX(-50%);
    padding: 10px;
    border: 1px solid rgba(246, 231, 165, 0.42);
    border-radius: 8px;
    background: rgba(5, 14, 36, 0.97);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48);
}

.inventory-use-popover.open {
    display: grid;
    gap: 7px;
}

.inventory-use-popover strong {
    color: #fff4bd;
    font-size: 0.78rem;
    line-height: 1.2;
}

.inventory-use-popover button {
    min-height: 30px;
    border: 1px solid rgba(246, 231, 165, 0.38);
    border-radius: 999px;
    background: rgba(246, 231, 165, 0.14);
    color: #fff4bd;
    font-size: 0.78rem;
    font-weight: 900;
}

.inventory-use-popover button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.inventory-use-popover button.level-locked {
    border-color: rgba(255, 93, 108, 0.72);
    background: rgba(190, 24, 45, 0.18);
    color: #ff6675;
    cursor: not-allowed;
}

.inventory-level-warning {
    color: #ff6675;
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
}

.inventory-item-modal {
    position: absolute;
    left: calc(100% + 0.7rem);
    top: 0;
    z-index: 50;
    width: min(340px, 80vw);
    max-height: min(520px, 78vh);
    overflow-y: auto;
    display: none;
    padding: 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(246, 231, 165, 0.34);
    background: rgba(5, 14, 36, 0.96);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.inventory-item-modal.equipment-card {
    width: min(222px, 82vw);
    max-height: min(520px, 82vh);
    padding: 0.62rem 0.68rem 0.74rem;
    border: 2px solid rgba(250, 222, 126, 0.82);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 13%, rgba(255, 230, 124, 0.24), transparent 18%),
        radial-gradient(circle at 16% 92%, rgba(37, 211, 172, 0.2), transparent 26%),
        linear-gradient(160deg, rgba(3, 74, 76, 0.98), rgba(4, 51, 64, 0.98) 52%, rgba(3, 80, 74, 0.98));
    box-shadow:
        inset 0 0 0 1px rgba(255, 244, 189, 0.55),
        inset 0 0 32px rgba(255, 244, 189, 0.09),
        0 26px 70px rgba(0, 0, 0, 0.6);
}

.inventory-slot:nth-child(8n) .inventory-item-modal,
.inventory-slot:nth-child(8n - 1) .inventory-item-modal,
.inventory-slot:nth-child(8n - 2) .inventory-item-modal {
    left: auto;
    right: calc(100% + 0.7rem);
}

.inventory-slot:hover .inventory-item-modal {
    display: block;
}

.inventory-modal-head {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(151, 218, 255, 0.13);
}

.inventory-item-modal.equipment-card .inventory-modal-head {
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    text-align: center;
    border-bottom: 2px solid rgba(255, 235, 156, 0.75);
    padding-bottom: 0.48rem;
}

.inventory-modal-head img {
    width: 4.2rem;
    height: 4.2rem;
}

.inventory-item-modal.equipment-card .inventory-modal-head img {
    width: 3.7rem;
    height: 3.7rem;
    object-fit: contain;
    filter:
        drop-shadow(0 0 16px rgba(255, 239, 153, 0.72))
        drop-shadow(0 0 28px rgba(255, 213, 74, 0.45));
}

.inventory-modal-head h2 {
    color: #fff4bd;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.2;
}

.inventory-item-modal.equipment-card .inventory-modal-head h2 {
    color: #fff0a8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    line-height: 1.06;
    font-weight: 800;
    text-shadow: 0 2px 0 rgba(86, 45, 12, 0.52), 0 0 18px rgba(255, 235, 156, 0.28);
}

.inventory-equipment-stars {
    display: flex;
    justify-content: center;
    gap: 0.08rem;
    margin-top: 0.05rem;
    color: #ffd966;
    font-size: 0.78rem;
    line-height: 1;
    text-shadow: 0 1px 0 #6c3e08, 0 0 10px rgba(255, 218, 87, 0.45);
}

.inventory-modal-head p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.inventory-modal-head span,
.inventory-modal-head em {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(78, 195, 247, 0.12);
    color: #aeeeff;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
}

.inventory-item-modal.equipment-card .inventory-modal-head span,
.inventory-item-modal.equipment-card .inventory-modal-head em {
    background: rgba(255, 240, 168, 0.12);
    color: #fff0a8;
    border: 1px solid rgba(255, 240, 168, 0.24);
}

.inventory-item-modal dl {
    display: grid;
    gap: 0.35rem;
    margin: 0.75rem 0;
}

.inventory-item-modal dl div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: #dbeafe;
    font-size: 0.84rem;
}

.inventory-item-modal dt {
    color: #94a3b8;
}

.inventory-item-modal dd {
    text-align: right;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.inventory-bound-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0.12rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.76rem;
    font-weight: 900;
}

.inventory-bound-pill.unbound {
    border-color: rgba(181, 234, 255, 0.92);
    background: linear-gradient(180deg, rgba(42, 185, 226, 0.98), rgba(12, 128, 189, 0.98));
    color: #ffffff;
}

.inventory-bound-pill.bound {
    border-color: rgba(255, 190, 190, 0.92);
    background: linear-gradient(180deg, rgba(221, 62, 62, 0.98), rgba(148, 24, 38, 0.98));
    color: #ffffff;
}

.inventory-item-modal dd small {
    display: block;
    margin-top: 0.18rem;
    color: #9fb4cf;
    font-size: 0.72rem;
}

.inventory-modal-stats {
    display: grid;
    gap: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(151, 218, 255, 0.13);
}

.inventory-item-modal.equipment-card .inventory-modal-stats {
    gap: 0.42rem;
    padding-top: 0.46rem;
    border-top: 0;
}

.inventory-modal-stats strong {
    color: #fff4bd;
    font-size: 0.9rem;
}

.inventory-equipment-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff45f;
    font-size: 0.84rem;
    border-bottom: 1px solid rgba(255, 242, 177, 0.72);
    padding: 0 0 0.32rem;
}

.inventory-equipment-level b,
.inventory-equipment-level em {
    font-style: normal;
    font-weight: 800;
}

.inventory-equipment-level.level-locked,
.inventory-equipment-requirements span.level-locked {
    color: #ff6675;
    text-shadow: 0 0 10px rgba(255, 55, 75, 0.42);
}

.inventory-slot.level-denied .inventory-use-popover,
.inventory-slot.level-denied .inventory-item-modal {
    animation: inventory-level-denied-shake 0.48s ease-in-out;
}

@keyframes inventory-level-denied-shake {
    0%, 100% { translate: 0 0; }
    20% { translate: -6px 0; }
    40% { translate: 6px 0; }
    60% { translate: -4px 0; }
    80% { translate: 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .inventory-slot.level-denied .inventory-use-popover,
    .inventory-slot.level-denied .inventory-item-modal {
        animation: none;
    }
}

.inventory-equipment-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.58rem;
    row-gap: 0.22rem;
    padding-bottom: 0.42rem;
    border-bottom: 1px solid rgba(255, 242, 177, 0.72);
}

.inventory-equipment-stat-grid span {
    display: flex;
    justify-content: space-between;
    color: #ffffff;
    font-size: 0.66rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.inventory-equipment-stat-grid i {
    color: #ffffff;
    font-style: normal;
    font-weight: 800;
}

.inventory-equipment-effects,
.inventory-equipment-requirements {
    display: grid;
    gap: 0.22rem;
    padding-bottom: 0.38rem;
    border-bottom: 1px solid rgba(255, 242, 177, 0.72);
}

.inventory-equipment-effects strong,
.inventory-equipment-requirements strong {
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
}

.inventory-equipment-effects > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
}

.inventory-equipment-effects span {
    min-width: 2.5rem;
    min-height: 1.38rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 242, 177, 0.62);
    background: radial-gradient(circle at 50% 38%, rgba(255, 240, 152, 0.22), rgba(4, 31, 53, 0.92));
    color: #fff0a8;
    font-weight: 900;
}

.inventory-equipment-effects i {
    font-style: normal;
}

.inventory-equipment-requirements span {
    color: #dbeafe;
}

.inventory-equipment-bound {
    display: flex;
    justify-content: center;
    padding-top: 0.15rem;
}

.inventory-equipment-bound .inventory-bound-pill {
    min-width: 7.1rem;
    min-height: 1.9rem;
    justify-content: center;
    border-width: 2px;
    border-radius: 12px;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.inventory-modal-stats span {
    display: flex;
    justify-content: space-between;
    color: #c9d7e8;
    font-size: 0.84rem;
}

.inventory-modal-stats i {
    color: #aeeeff;
    font-style: normal;
    font-weight: 900;
}

.inventory-item-modal.equipment-card .inventory-equipment-stat-grid span {
    display: flex;
    justify-content: space-between;
    color: #ffffff;
    font-size: 0.66rem;
}

.inventory-item-modal.equipment-card .inventory-equipment-stat-grid i {
    color: #ffffff;
}

.inventory-item-modal.equipment-card .inventory-equipment-effects span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 1.38rem;
    color: #fff0a8;
    font-size: 0.58rem;
}

.inventory-item-modal.equipment-card .inventory-equipment-bound .inventory-bound-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
}

.inventory-empty-filter {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(151, 218, 255, 0.16);
    background: rgba(7, 16, 32, 0.66);
    color: #c9d7e8;
    text-align: center;
}

.inventory-open-result {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(3, 8, 18, 0.64);
    backdrop-filter: blur(8px);
}

.inventory-open-result[hidden] {
    display: none;
}

.inventory-open-panel {
    position: relative;
    width: min(560px, 92vw);
    border: 1px solid rgba(246, 231, 165, 0.42);
    border-radius: 8px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(12, 25, 52, 0.98), rgba(5, 12, 27, 0.98));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 30px rgba(78, 195, 247, 0.10);
    color: white;
}

.inventory-open-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.82);
}

.inventory-open-kicker {
    display: block;
    color: #aeeeff;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.inventory-open-panel h2 {
    margin-top: 4px;
    color: #fff4bd;
    font-size: 1.6rem;
    font-weight: 900;
}

.inventory-open-currencies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.inventory-open-currencies span {
    border: 1px solid rgba(246, 231, 165, 0.38);
    border-radius: 999px;
    padding: 6px 12px;
    color: #fff4bd;
    font-weight: 900;
}

.inventory-open-rewards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.inventory-open-rewards article {
    display: grid;
    gap: 6px;
    justify-items: center;
    min-height: 118px;
    padding: 12px;
    border: 1px solid rgba(151, 218, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

.inventory-open-rewards img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.inventory-open-rewards strong {
    color: white;
    font-size: 0.82rem;
    line-height: 1.2;
}

.inventory-open-rewards span {
    color: #fff4bd;
    font-weight: 900;
}

.inventory-open-panel p {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 1050px) {
    .home-dashboard {
        grid-template-columns: 1fr;
    }

    .home-hero-inner {
        grid-template-columns: 1fr;
    }

    .home-gift-banner {
        display: none;
    }

    .home-realm-road {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-realm-road::before {
        display: none;
    }
}

@media (max-width: 760px) {
    .home-hero {
        min-height: auto;
        padding-top: 3rem;
    }

    .home-quick-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-platforms {
        margin-left: 0;
    }

    .home-feature-content {
        grid-template-columns: 1fr;
    }

    .home-feature-art {
        display: grid;
    }

    .home-feature-art img {
        width: 100%;
        height: 170px;
        min-height: 170px;
    }

    .home-feature-intro {
        position: relative;
        inset: auto;
        padding: 0.85rem;
        grid-template-columns: 1fr;
        background: rgba(5, 14, 36, 0.78);
    }

    .home-news-compact a {
        grid-template-columns: 4.4rem minmax(0, 1fr);
    }

    .home-news-compact time {
        grid-column: 2;
    }

    .home-realm-road {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-action-dock {
        right: 0.45rem;
        gap: 0.35rem;
    }

    .quick-action-dock a {
        width: 2.35rem;
        height: 2.35rem;
    }

    .quick-action-dock b {
        display: none;
    }

    .feature-shell {
        width: min(100% - 1rem, 1180px);
        padding: 1rem;
    }

    .site-shell,
    .donate-shell {
        width: min(100% - 1rem, 1180px);
    }

    .site-shell {
        padding: 1rem;
    }

    .donate-shell {
        grid-template-columns: 1fr;
    }

    .donate-art {
        min-height: 300px;
    }

    .donate-panel {
        padding: 1rem;
        border-left: 0;
        border-top: 1px solid rgba(151, 218, 255, 0.16);
    }

    .leaderboard-podium {
        grid-template-columns: 1fr;
    }

    .leaderboard-podium article,
    .leaderboard-podium article.first {
        min-height: 9rem;
    }

    .leaderboard-tools,
    .leaderboard-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-shell {
        width: min(100% - 1rem, 1180px);
        padding: 0.9rem;
    }

    .inventory-heading,
    .inventory-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
        gap: 0.55rem;
    }

    .inventory-slot {
        min-height: 76px;
    }

    .inventory-slot img {
        width: 56px;
        height: 56px;
    }

    .inventory-item-modal {
        left: 50%;
        top: calc(100% + 0.55rem);
        right: auto;
        transform: translateX(-50%);
    }

    .inventory-slot:nth-child(8n) .inventory-item-modal,
    .inventory-slot:nth-child(8n - 1) .inventory-item-modal,
    .inventory-slot:nth-child(8n - 2) .inventory-item-modal {
        left: 50%;
        right: auto;
    }

    #rank-search {
        width: 100%;
    }

    .feature-card,
    .feature-list article {
        grid-template-columns: 3.7rem minmax(0, 1fr);
    }

    .feature-card img,
    .feature-fallback {
        width: 3.7rem;
        height: 3.7rem;
    }
}

/* Home/news panels */
.home-section-title,
.news-page-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.home-section-title span,
.news-kicker {
    display: inline-block;
    color: #81d4fa;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.home-section-title h2,
.news-page-heading h1 {
    color: #f6e7a5;
    font-family: Signika, sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    text-shadow: 0 0 18px rgba(79, 195, 247, 0.35);
}

.news-page-heading p {
    max-width: 44rem;
    margin: 0.6rem auto 0;
    color: #aab4c6;
}

.home-news-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
    gap: 1.25rem;
}

.home-news-banner,
.home-news-tabs,
.news-list-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(155, 190, 255, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(12, 26, 58, 0.92), rgba(6, 14, 34, 0.95)),
        radial-gradient(circle at 50% 0, rgba(79, 195, 247, 0.16), transparent 44%);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32), inset 0 0 35px rgba(79, 195, 247, 0.06);
}

.home-news-banner {
    min-height: 23rem;
}

.home-news-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.home-news-slide.active {
    opacity: 1;
    visibility: visible;
}

.home-news-slide img,
.home-news-slide-fallback {
    width: 100%;
    height: 100%;
    min-height: 23rem;
    object-fit: cover;
    display: block;
}

.home-news-slide-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 38%, rgba(79, 195, 247, 0.26), transparent 42%), #08152d;
    color: rgba(240, 216, 120, 0.28);
    font-size: 7rem;
    font-weight: 800;
}

.home-news-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(3, 8, 19, 0.88));
}

.home-news-slide-copy {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 1;
}

.home-news-slide-copy span,
.news-line-category {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.12rem 0.5rem;
    border-radius: 4px;
    background: rgba(79, 195, 247, 0.16);
    color: #9ee7ff;
    border: 1px solid rgba(79, 195, 247, 0.26);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.home-news-slide-copy h3 {
    margin-top: 0.55rem;
    color: #fff;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1.15;
    font-weight: 800;
}

.home-news-slide-copy time {
    display: block;
    color: #c8d2e6;
    margin-top: 0.45rem;
    font-size: 0.9rem;
}

.home-news-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.65rem;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 0.45rem;
}

.home-news-dots button {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    transition: width 0.25s ease, background 0.25s ease;
}

.home-news-dots button.active {
    width: 1.5rem;
    background: #f0d878;
}

.home-news-tabs {
    padding: 1rem;
}

.home-news-tab-buttons,
.news-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.home-news-tab-buttons {
    margin-bottom: 0.9rem;
}

.home-news-tab-buttons button,
.news-category-tabs a {
    min-height: 2.35rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(155, 190, 255, 0.2);
    border-radius: 6px;
    background: rgba(9, 20, 46, 0.75);
    color: #cbd6ea;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.home-news-tab-buttons button.active,
.news-category-tabs a.active {
    border-color: rgba(240, 216, 120, 0.74);
    background: linear-gradient(180deg, rgba(240, 216, 120, 0.18), rgba(212, 175, 55, 0.08));
    color: #f6e7a5;
}

.home-news-tab-panel {
    display: none;
}

.home-news-tab-panel.active {
    display: block;
}

.home-news-list-item,
.news-line-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 3.35rem;
    border-bottom: 1px solid rgba(155, 190, 255, 0.12);
    color: #dfe8fa;
    transition: background 0.2s ease, color 0.2s ease;
}

.home-news-list-item:hover,
.news-line-item:hover {
    background: rgba(79, 195, 247, 0.07);
    color: #f6e7a5;
}

.home-news-list-item span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.home-news-list-item strong,
.news-line-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.home-news-list-item time,
.news-line-item time {
    color: #9ba9c2;
    font-size: 0.84rem;
    white-space: nowrap;
}

.home-news-empty,
.news-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #8f9ab0;
}

.home-news-more {
    display: inline-flex;
    justify-content: center;
    min-width: 8rem;
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(240, 216, 120, 0.36);
    color: #f0d878;
    background: rgba(212, 175, 55, 0.08);
    font-weight: 700;
    font-size: 0.88rem;
}

.news-category-tabs {
    justify-content: center;
    margin-bottom: 1.25rem;
}

.news-list-panel {
    padding: 0.65rem;
}

.news-line-item {
    padding: 0.25rem 0.75rem;
}

.news-line-index {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(240, 216, 120, 0.11);
    color: #f0d878;
    font-weight: 800;
    font-size: 0.78rem;
}

.news-line-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.35rem;
}

.news-pagination a,
.news-pagination span span {
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    border: 1px solid rgba(155, 190, 255, 0.2);
    background: rgba(9, 20, 46, 0.82);
    color: #dfe8fa;
    font-weight: 700;
}

.news-pagination span span {
    border-color: rgba(240, 216, 120, 0.74);
    color: #f6e7a5;
    background: rgba(212, 175, 55, 0.14);
}

.news-detail-content :is(h1, h2, h3) {
    color: #f6e7a5;
    font-weight: 800;
    margin: 1.2rem 0 0.55rem;
}

.news-detail-content p,
.news-detail-content ul,
.news-detail-content ol,
.news-detail-content blockquote {
    margin: 0.85rem 0;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

@media (max-width: 900px) {
    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .home-news-banner,
    .home-news-slide img,
    .home-news-slide-fallback {
        min-height: 18rem;
    }

    .home-news-list-item span,
    .news-line-main {
        display: block;
    }

    .news-line-category {
        margin-top: 0.35rem;
    }

    .news-line-item time {
        align-self: flex-start;
        padding-top: 0.25rem;
    }
}

/* =========================================================
   PROFILE CHARACTER PAGE - CLEAN FINAL V5
   Mục tiêu:
   - Xóa toàn bộ CSS profile bị lặp/chồng.
   - Không tự vẽ background item vì background PNG đã có khung.
   - Chỉ đặt icon/text vào đúng khung nền.
   - Căn lại hàng trên + cột trái/phải + hàng dưới.
   ========================================================= */

/* ===== PAGE FIT ===== */

.profile-page-body {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.profile-page-body::before,
.profile-page-body footer {
    display: none !important;
}

.profile-page-body main,
main:has(.profile-character-page) {
    position: fixed;
    inset: 4rem 0 0 0;
    height: auto;
    min-height: 0;
    padding: 0.45rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.profile-page-body main > .max-w-7xl,
main:has(.profile-character-page) > .max-w-7xl {
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== BACKGROUND FRAME ===== */

.profile-character-page {
    position: relative;
    width: min(100vw, calc((100vh - 4.9rem) * 1672 / 941));
    height: auto;
    max-height: calc(100vh - 4.9rem);
    aspect-ratio: 1672 / 941;
    min-height: 0;
    margin: 0;
    padding: 0;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background-image: url('/images/ui/characterbg.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: #4e3927;
}

/* Reset old panels on profile page */
.profile-character-page .profile-paper,
.profile-character-page .profile-identity-panel,
.profile-character-page .profile-stats-panel {
    position: absolute;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

/* ===== LEFT IDENTITY PANEL ===== */

.profile-page-body .profile-identity-panel,
.profile-character-page .profile-identity-panel {
    left: 4.8%;
    top: 17.2%;
    width: 20.8%;
    height: 70%;
    display: block;
}

.profile-page-body .profile-identity-head,
.profile-character-page .profile-identity-head {
    position: absolute;
    left: 2.5%;
    top: 4%;
    width: 100%;
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 5%;
    align-items: center;
}

.profile-page-body .profile-avatar,
.profile-character-page .profile-avatar {
    width: clamp(45px, 4.7vw, 190px);
    height: clamp(45px, 4.7vw, 190px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(157, 111, 45, 0.75);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.45);
}

.profile-page-body .profile-avatar-fallback,
.profile-character-page .profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
}

.profile-page-body .profile-identity-head h2,
.profile-character-page .profile-identity-head h2 {
    margin: 0;
    color: #563921;
    font-family: Georgia, serif;
    font-size: clamp(0.9rem, 1.5vw, 1.95rem);
    line-height: 1.05;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-page-body .profile-identity-head p,
.profile-character-page .profile-identity-head p {
    margin: 0.35rem 0 0;
    color: #9a6b28;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: clamp(0.7rem, 1vw, 1.25rem);
    line-height: 1.2;
    max-width: 8ch;
    word-break: break-word;
}

.profile-page-body .profile-rank-ribbon,
.profile-character-page .profile-rank-ribbon {
    position: absolute;
    left: 26%;
    top: 30.4%;
    width: 40%;
    min-width: 0;
    padding: 0.25rem 0.4rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b2212, #7b4b1d, #3b2212);
    color: #ffe7a3;
    text-align: center;
    font-family: Georgia, serif;
    font-weight: 800;
    font-style: italic;
    font-size: clamp(0.72rem, 1.05vw, 1.15rem);
    box-shadow: 0 0 0 2px rgba(215, 175, 85, 0.35), 0 0 18px rgba(163, 109, 36, 0.42);
}

.profile-page-body .profile-sect-box,
.profile-character-page .profile-sect-box {
    display: none !important;
}

/* ===== CENTER EQUIPMENT STAGE ===== */

.profile-page-body .profile-center-stage,
.profile-character-page .profile-center-stage {
    position: absolute !important;
    left: 29.55% !important;
    top: 5.15% !important;
    width: 39.05% !important;
    height: 90% !important;
    min-height: 0 !important;
}

/* Nhóm slot chỉ còn là wrapper logic, không tạo box phủ lên nhân vật. */
.profile-page-body .profile-stage-top,
.profile-page-body .profile-stage-left,
.profile-page-body .profile-stage-right,
.profile-page-body .profile-stage-bottom,
.profile-character-page .profile-stage-top,
.profile-character-page .profile-stage-left,
.profile-character-page .profile-stage-right,
.profile-character-page .profile-stage-bottom {
    display: contents !important;
    transform: none !important;
    gap: 0 !important;
}

/* ===== SLOT STYLE: KHÔNG VẼ BACKGROUND ITEM ===== */

.profile-page-body .profile-ornate-slot,
.profile-character-page .profile-ornate-slot {
    --slot-size: clamp(40px, min(4.15vw, 7.1vh), 68px);
    --slot-icon-size: 78%;

    position: absolute !important;
    width: var(--slot-size) !important;
    height: var(--slot-size) !important;
    aspect-ratio: 1 / 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;

    border-radius: 4px !important;
    overflow: visible !important;

    transform: translate(-50%, -50%) !important;
    z-index: 12 !important;
}

.profile-page-body .profile-ornate-slot img,
.profile-character-page .profile-ornate-slot img {
    display: block !important;
    width: var(--slot-icon-size) !important;
    height: var(--slot-icon-size) !important;
    max-width: var(--slot-icon-size) !important;
    max-height: var(--slot-icon-size) !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: auto !important;
    transform: none !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 5px rgba(40, 20, 8, 0.35)) !important;
    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        opacity 0.18s ease;
}

.profile-page-body .profile-ornate-slot span,
.profile-character-page .profile-ornate-slot span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;

    color: rgba(255, 231, 170, 0.92) !important;
    font-family: Georgia, serif;
    font-size: clamp(0.52rem, 0.72vw, 0.86rem) !important;
    line-height: 1.05 !important;
    text-align: center !important;
    word-break: break-word;
    text-shadow: 0 1px 2px rgba(50, 30, 12, 0.65), 0 0 8px rgba(255, 210, 90, 0.25);
}

/* ===== SLOT POSITIONS: mỗi item có style riêng ===== */

.profile-page-body .profile-slot-out-helmet,
.profile-character-page .profile-slot-out-helmet {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 76%;
    left: 18% !important;
    top: 6.2% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

.profile-page-body .profile-slot-out-helmet span,
.profile-character-page .profile-slot-out-helmet span {
    position: relative !important;
    left: -10% !important;
    right: auto !important;
    top: -2% !important;
    width: 100% !important;
    height: 100% !important;
    font-size: clamp(1.2rem, 0.72vw, 1.2rem) !important;
    line-height: 1.05 !important;
    text-align: center !important;
}

.profile-page-body .profile-slot-outhat,
.profile-character-page .profile-slot-outhat {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 76%;
    left: 36% !important;
    top: 5.2% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

.profile-page-body .profile-slot-garment,
.profile-character-page .profile-slot-garment {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 76%;
    left: 55.5% !important;
    top: 5.2% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

.profile-page-body .profile-slot-mantle,
.profile-character-page .profile-slot-mantle {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 76%;
    left: 78% !important;
    top: 6.2% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

.profile-page-body .profile-slot-mantle img,
.profile-character-page .profile-slot-mantle img {
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    width: 76% !important;
    height: 76% !important;
    max-width: 76% !important;
    max-height: 76% !important;
}

.profile-page-body .profile-slot-mantle span,
.profile-character-page .profile-slot-mantle span {
    position: relative !important;
    right: auto !important;
    width: 100% !important;
    height: 100% !important;
    left: -22% !important;
    top: -2% !important;
    font-size: clamp(1.2rem, 0.72vw, 1.2rem) !important;
    line-height: 1.05 !important;
    text-align: center !important;
}

.profile-page-body .profile-slot-helmet,
.profile-character-page .profile-slot-helmet {
    --slot-icon-size: 78%;
    left: 6% !important;
    top: 21.5% !important;
}

.profile-page-body .profile-slot-armor,
.profile-character-page .profile-slot-armor {
    --slot-icon-size: 78%;
    left: 6% !important;
    top: 32.5% !important;
}

.profile-page-body .profile-slot-belt,
.profile-character-page .profile-slot-belt {
    --slot-icon-size: 78%;
    left: 6% !important;
    top: 44% !important;
}

.profile-page-body .profile-slot-bracer,
.profile-character-page .profile-slot-bracer {
    --slot-icon-size: 78%;
    left: 6% !important;
    top: 55% !important;
}

.profile-page-body .profile-slot-boots,
.profile-character-page .profile-slot-boots {
    --slot-icon-size: 78%;
    left: 6% !important;
    top: 66% !important;
}

.profile-page-body .profile-slot-book,
.profile-character-page .profile-slot-book {
    --slot-icon-size: 78%;
    left: 6% !important;
    top: 77.5% !important;
}

.profile-page-body .profile-slot-weapon,
.profile-character-page .profile-slot-weapon {
    --slot-size: clamp(40px, min(4.05vw, 6.9vh), 66px);
    --slot-icon-size: 76%;
    left: 84.5% !important;
    top: 22% !important;
    width: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
    height: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
}

.profile-page-body .profile-slot-necklace,
.profile-character-page .profile-slot-necklace {
    --slot-size: clamp(40px, min(4.05vw, 6.9vh), 66px);
    --slot-icon-size: 76%;
    left: 84.5% !important;
    top: 33% !important;
    width: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
    height: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
}

.profile-page-body .profile-slot-ring,
.profile-character-page .profile-slot-ring {
    --slot-size: clamp(40px, min(4.05vw, 6.9vh), 66px);
    --slot-icon-size: 76%;
    left: 84.5% !important;
    top: 44% !important;
    width: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
    height: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
}

.profile-page-body .profile-slot-pendant,
.profile-character-page .profile-slot-pendant {
    --slot-size: clamp(40px, min(4.05vw, 6.9vh), 66px);
    --slot-icon-size: 76%;
    left: 84.5% !important;
    top: 55% !important;
    width: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
    height: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
}

.profile-page-body .profile-slot-talisman,
.profile-character-page .profile-slot-talisman {
    --slot-size: clamp(40px, min(4.05vw, 6.9vh), 66px);
    --slot-icon-size: 76%;
    left: 84.5% !important;
    top: 66% !important;
    width: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
    height: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
}

.profile-page-body .profile-slot-horse,
.profile-character-page .profile-slot-horse {
    --slot-size: clamp(40px, min(4.05vw, 6.9vh), 66px);
    --slot-icon-size: 76%;
    left: 84.5% !important;
    top: 77.5% !important;
    width: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
    height: clamp(40px, min(4.05vw, 6.9vh), 66px) !important;
}

.profile-page-body .profile-slot-bottom-left,
.profile-character-page .profile-slot-bottom-left {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 78%;
    left: 28.5% !important;
    top: 94% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

.profile-page-body .profile-slot-bottom-center,
.profile-character-page .profile-slot-bottom-center {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 78%;
    left: 46.5% !important;
    top: 94% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

.profile-page-body .profile-slot-bottom-right,
.profile-character-page .profile-slot-bottom-right {
    --slot-size: clamp(42px, min(4.25vw, 7.25vh), 70px);
    --slot-icon-size: 78%;
    left: 64.6% !important;
    top: 94% !important;
    width: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
    height: clamp(42px, min(4.25vw, 7.25vh), 70px) !important;
}

/* ===== CHARACTER MODEL ===== */

.profile-page-body .profile-character-frame.ornate,
.profile-character-page .profile-character-frame.ornate {
    position: absolute;
    inset: 12% 11% 11.5% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.profile-page-body .profile-character-frame.ornate::after,
.profile-character-page .profile-character-frame.ornate::after {
    display: none !important;
}

.profile-page-body .profile-character-frame.ornate .profile-character-model,
.profile-character-page .profile-character-frame.ornate .profile-character-model {
    position: relative;
    z-index: 2;
    max-width: 67% !important;
    max-height: 88% !important;
    object-fit: contain !important;
    filter: drop-shadow(0 16px 28px rgba(100, 70, 32, 0.38));
}

.profile-page-body .profile-character-center-frame,
.profile-character-page .profile-character-center-frame {
    inset: auto !important;
    left: 20% !important;
    right: auto !important;
    top: 12% !important;
    bottom: auto !important;
    width: 75% !important;
    height: 75% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

.profile-page-body .profile-character-center-model,
.profile-character-page .profile-character-center-model {
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 67% !important;
    max-height: 88% !important;
}

.profile-page-body .profile-character-center-empty,
.profile-character-page .profile-character-center-empty {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
}

/* ===== RIGHT STAT PANEL ===== */

.profile-page-body .profile-stats-panel,
.profile-character-page .profile-stats-panel {
    display: block !important;
    right: 5.05%;
    top: 16.05%;
    width: 27.25%;
    height: 72.2%;
    pointer-events: none;
}

.profile-page-body .profile-stats-panel h2,
.profile-page-body .profile-stats-grid,
.profile-character-page .profile-stats-panel h2,
.profile-character-page .profile-stats-grid {
    display: none !important;
}

.profile-page-body .profile-stats-values,
.profile-page-body .profile-stat-values,
.profile-character-page .profile-stats-values,
.profile-character-page .profile-stat-values {
    position: absolute;
    inset: 0;
    display: block;
    font-family: Georgia, serif;
    color: #46311f;
}

.profile-page-body .profile-stats-values .stat-v,
.profile-page-body .profile-stat-value,
.profile-character-page .profile-stats-values .stat-v,
.profile-character-page .profile-stat-value {
    position: absolute;
    display: block;
    max-width: 24%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.54rem, 0.76vw, 0.84rem);
    line-height: 1;
    font-weight: 800;
    text-align: right;
}

.profile-page-body .profile-stat-value.body-type,
.profile-page-body .profile-stat-value.realm,
.profile-character-page .profile-stat-value.body-type,
.profile-character-page .profile-stat-value.realm {
    max-width: 32%;
    text-align: left;
}

/* Stat value positions */
.profile-page-body .profile-stat-value.body-type,
.profile-character-page .profile-stat-value.body-type {
    left: 30.5%;
    top: 14.7%;
}

.profile-page-body .profile-stat-value.realm,
.profile-character-page .profile-stat-value.realm {
    left: 30.5%;
    top: 24.1%;
}

.profile-page-body .profile-stat-value.hp,
.profile-character-page .profile-stat-value.hp {
    left: 31.5%;
    top: 32.4%;
}

.profile-page-body .profile-stat-value.mp,
.profile-character-page .profile-stat-value.mp {
    left: 31.5%;
    top: 40.7%;
}

.profile-page-body .profile-stat-value.atk,
.profile-character-page .profile-stat-value.atk {
    left: 31.5%;
    top: 49.1%;
}

.profile-page-body .profile-stat-value.def,
.profile-character-page .profile-stat-value.def {
    left: 31.5%;
    top: 57.3%;
}

.profile-page-body .profile-stat-value.crit,
.profile-character-page .profile-stat-value.crit {
    left: 31.5%;
    top: 65.7%;
}

.profile-page-body .profile-stat-value.crit-dmg,
.profile-character-page .profile-stat-value.crit-dmg {
    left: 31.5%;
    top: 74%;
}

.profile-page-body .profile-stat-value.cultivate,
.profile-character-page .profile-stat-value.cultivate {
    left: 31.5%;
    top: 82.4%;
}

.profile-page-body .profile-stat-value.kim-dmg,
.profile-character-page .profile-stat-value.kim-dmg {
    left: 31.5%;
    top: 90.6%;
}

.profile-page-body .profile-stat-value.moc-dmg,
.profile-character-page .profile-stat-value.moc-dmg {
    left: 31.5%;
    top: 98.8%;
    display: none;
}

.profile-page-body .profile-stat-value.kim-res,
.profile-character-page .profile-stat-value.kim-res {
    right: 6.4%;
    top: 15%;
}

.profile-page-body .profile-stat-value.moc-res,
.profile-character-page .profile-stat-value.moc-res {
    right: 6.4%;
    top: 23.2%;
}

.profile-page-body .profile-stat-value.thuy-res,
.profile-character-page .profile-stat-value.thuy-res {
    right: 6.4%;
    top: 31.5%;
}

.profile-page-body .profile-stat-value.hoa-res,
.profile-character-page .profile-stat-value.hoa-res {
    right: 6.4%;
    top: 39.8%;
}

.profile-page-body .profile-stat-value.tho-res,
.profile-character-page .profile-stat-value.tho-res {
    right: 6.4%;
    top: 48.1%;
}

.profile-page-body .profile-stat-value.dodge,
.profile-character-page .profile-stat-value.dodge {
    right: 6.4%;
    top: 56.4%;
}

.profile-page-body .profile-stat-value.speed,
.profile-character-page .profile-stat-value.speed {
    right: 6.4%;
    top: 64.7%;
}

.profile-page-body .profile-stat-value.revive,
.profile-character-page .profile-stat-value.revive {
    right: 6.4%;
    top: 73%;
}

.profile-page-body .profile-stat-value.weapon-qi,
.profile-character-page .profile-stat-value.weapon-qi {
    right: 6.4%;
    top: 81.3%;
}

.profile-page-body .profile-stat-value.base-qi,
.profile-character-page .profile-stat-value.base-qi {
    right: 6.4%;
    top: 89.6%;
}

.profile-page-body .profile-stat-value.counter,
.profile-character-page .profile-stat-value.counter {
    right: 6.4%;
    top: 97.9%;
    display: none;
}

.profile-page-body .profile-stat-value.thuy-dmg,
.profile-page-body .profile-stat-value.hoa-dmg,
.profile-page-body .profile-stat-value.tho-dmg,
.profile-character-page .profile-stat-value.thuy-dmg,
.profile-character-page .profile-stat-value.hoa-dmg,
.profile-character-page .profile-stat-value.tho-dmg {
    display: none !important;
}

@media (max-width: 900px) {
    .profile-page-body .profile-ornate-slot,
    .profile-character-page .profile-ornate-slot {
        --slot-size: clamp(34px, min(4.0vw, 6.4vh), 58px);
    }

    .profile-page-body .profile-stage-top .profile-ornate-slot,
    .profile-character-page .profile-stage-top .profile-ornate-slot,
    .profile-page-body .profile-stage-bottom .profile-ornate-slot,
    .profile-character-page .profile-stage-bottom .profile-ornate-slot {
        --slot-size: clamp(36px, min(4.05vw, 6.6vh), 60px);
    }
}

/* Hover nhẹ để item có cảm giác game */
.profile-page-body .profile-ornate-slot:hover img,
.profile-character-page .profile-ornate-slot:hover img {
    transform: scale(1.08) !important;
    filter:
        drop-shadow(0 3px 4px rgba(40, 22, 8, 0.65))
        drop-shadow(0 0 10px rgba(255, 214, 100, 0.65))
        drop-shadow(0 0 18px rgba(255, 176, 46, 0.35)) !important;
}

.profile-page-body .profile-ornate-slot.has-equipped-item,
.profile-character-page .profile-ornate-slot.has-equipped-item {
    cursor: pointer;
}

.profile-equipped-tooltip {
    position: fixed;
    z-index: 100;
    pointer-events: none;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card {
    display: block;
    width: min(222px, 76vw);
    max-height: min(500px, 76vh);
    padding: 0.62rem 0.68rem 0.74rem;
    color: #ffffff;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-head {
    gap: 0.22rem;
    padding-bottom: 0.55rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-head img {
    width: 4.15rem;
    height: 4.15rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-head h2 {
    font-size: clamp(1.35rem, 2.35vw, 1.85rem);
    line-height: 1.05;
}

.profile-equipped-tooltip .inventory-equipment-stars {
    font-size: 0.82rem;
    gap: 0.1rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-head p {
    margin-top: 0.18rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-head span,
.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-head em {
    font-size: 0.58rem;
    padding: 0.08rem 0.32rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-modal-stats {
    gap: 0.48rem;
    padding-top: 0.52rem;
}

.profile-equipped-tooltip .inventory-equipment-level {
    font-size: 0.86rem;
    padding-bottom: 0.34rem;
}

.profile-equipped-tooltip .inventory-equipment-stat-grid {
    column-gap: 0.82rem;
    row-gap: 0.28rem;
    padding-bottom: 0.48rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-equipment-stat-grid span {
    font-size: 0.72rem;
}

.profile-equipped-tooltip .inventory-equipment-effects,
.profile-equipped-tooltip .inventory-equipment-requirements {
    gap: 0.26rem;
    padding-bottom: 0.45rem;
}

.profile-equipped-tooltip .inventory-equipment-effects strong,
.profile-equipped-tooltip .inventory-equipment-requirements strong {
    font-size: 0.78rem;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card .inventory-equipment-effects span {
    min-width: 2.85rem;
    min-height: 1.6rem;
    border-radius: 6px;
    font-size: 0.62rem;
}

.profile-equipped-tooltip .inventory-equipment-requirements span {
    font-size: 0.68rem;
}

.profile-equipped-tooltip[hidden] {
    display: none;
}

.profile-equipped-tooltip.inventory-item-modal.equipment-card[hidden] {
    display: none;
}

.profile-equipped-tooltip-head {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 224, 160, 0.22);
}

.profile-equipped-tooltip-head img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 214, 100, 0.32));
}

.profile-equipped-tooltip-head strong {
    display: block;
    color: #fff1bd;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.2;
}

.profile-equipped-tooltip-head small {
    display: block;
    margin-top: 3px;
    color: rgba(255, 236, 190, 0.72);
    font-size: 0.72rem;
    font-weight: 800;
}

.profile-equipped-tooltip-stats {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.profile-equipped-tooltip-stats span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255, 245, 220, 0.82);
    font-size: 0.78rem;
}

.profile-equipped-tooltip-stats b {
    color: #fff1bd;
    font-weight: 900;
}

.profile-equipped-action {
    position: fixed;
    z-index: 105;
    display: grid;
    gap: 8px;
    width: 150px;
    padding: 10px;
    border: 1px solid rgba(174, 124, 42, 0.48);
    border-radius: 8px;
    background: rgba(42, 28, 12, 0.98);
    box-shadow: 0 18px 44px rgba(68, 38, 8, 0.38), inset 0 0 22px rgba(255, 214, 100, 0.10);
}

.profile-equipped-action[hidden] {
    display: none;
}

.profile-equipped-action strong {
    color: #fff1bd;
    font-size: 0.78rem;
    line-height: 1.2;
}

.profile-equipped-action button {
    min-height: 30px;
    border: 1px solid rgba(255, 224, 160, 0.42);
    border-radius: 999px;
    background: rgba(255, 224, 160, 0.16);
    color: #fff1bd;
    font-size: 0.78rem;
    font-weight: 900;
}

.profile-action-message {
    max-width: 64rem;
    margin: 0 auto 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
}

.profile-action-message.success {
    border: 1px solid rgba(134, 239, 172, 0.26);
    background: rgba(22, 101, 52, 0.18);
    color: #bbf7d0;
}

.profile-action-message.error {
    border: 1px solid rgba(252, 165, 165, 0.26);
    background: rgba(127, 29, 29, 0.18);
    color: #fecaca;
}

/* Text ô trống như Ngoại Nón / Phi Phong / Bí Kíp / Tọa Kỵ */
.profile-page-body .profile-ornate-slot span,
.profile-character-page .profile-ornate-slot span {
    color: rgba(255, 231, 170, 0.92) !important;
    font-family: Georgia, serif !important;
    font-weight: 700 !important;
    text-align: center !important;
    line-height: 1.05 !important;
    text-shadow:
        0 1px 2px rgba(60, 35, 10, 0.75),
        0 0 8px rgba(255, 214, 100, 0.35) !important;
}

/* Ô trống: làm chữ rõ hơn nhưng không thêm nền */
.profile-page-body .profile-ornate-slot.empty,
.profile-character-page .profile-ornate-slot.empty {
    background: transparent !important;
}

/* Nếu item có class rarity thì thêm glow riêng */
.profile-page-body .profile-ornate-slot.rarity-common img,
.profile-character-page .profile-ornate-slot.rarity-common img {
    filter:
        drop-shadow(0 2px 3px rgba(40, 22, 8, 0.45))
        drop-shadow(0 0 5px rgba(180, 180, 180, 0.35)) !important;
}

.profile-page-body .profile-ornate-slot.rarity-rare img,
.profile-character-page .profile-ornate-slot.rarity-rare img {
    filter:
        drop-shadow(0 2px 3px rgba(40, 22, 8, 0.45))
        drop-shadow(0 0 7px rgba(66, 165, 245, 0.55)) !important;
}

.profile-page-body .profile-ornate-slot.rarity-epic img,
.profile-character-page .profile-ornate-slot.rarity-epic img {
    filter:
        drop-shadow(0 2px 3px rgba(40, 22, 8, 0.45))
        drop-shadow(0 0 8px rgba(171, 71, 188, 0.6)) !important;
}

.profile-page-body .profile-ornate-slot.rarity-legendary img,
.profile-character-page .profile-ornate-slot.rarity-legendary img {
    filter:
        drop-shadow(0 2px 3px rgba(40, 22, 8, 0.5))
        drop-shadow(0 0 9px rgba(255, 167, 38, 0.7))
        drop-shadow(0 0 16px rgba(255, 214, 100, 0.35)) !important;
}

/* Nếu HTML chưa có rarity class, vẫn có glow mặc định đẹp */
.profile-page-body .profile-ornate-slot:not(.empty) img,
.profile-character-page .profile-ornate-slot:not(.empty) img {
    opacity: 1 !important;
}

/* ===== THIEN KIEP THIEN KIEP KHAI BAO PREVIEW ===== */

.thien-kiep-khai-bao-page-body {
    min-height: 100vh;
    overflow: hidden;
    background: #07090d;
    font-family: "Signika", sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.thien-kiep-khai-bao-page-body::before {
    display: none;
}

.thien-kiep-khai-bao-page {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    overflow: hidden;
    color: rgba(245, 247, 252, 0.92);
    background: #05070b;
}

.thien-kiep-khai-bao-asset-loader {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #f8fafc;
    background:
        radial-gradient(circle at 50% 42%, rgba(212, 175, 55, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(5, 7, 11, 0.96), rgba(5, 7, 11, 0.92));
    transition: opacity 0.32s ease, visibility 0.32s ease;
}

.thien-kiep-khai-bao-asset-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.thien-kiep-khai-bao-asset-loader section {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    text-align: center;
}

.thien-kiep-khai-bao-asset-loader strong {
    color: #f0d878;
    font-size: clamp(1.7rem, 4vw, 3.1rem);
    font-weight: 500;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.38);
}

.thien-kiep-khai-bao-asset-loader span {
    color: rgba(245, 247, 252, 0.74);
}

.thien-kiep-khai-bao-asset-loader i {
    height: 8px;
    overflow: hidden;
    border: 1px solid rgba(240, 216, 120, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.thien-kiep-khai-bao-asset-loader b {
    display: block;
    width: var(--asset-progress, 0%);
    height: 100%;
    background: linear-gradient(90deg, #d9a83d, #ffe28a);
    box-shadow: 0 0 18px rgba(240, 216, 120, 0.42);
    transition: width 0.24s ease;
}

.thien-kiep-khai-bao-page.shaking {
    animation: thien-kiep-khai-bao-shake 0.58s ease-in-out;
}

.thien-kiep-khai-bao-bg-video,
.thien-kiep-khai-bao-sky,
.thien-kiep-khai-bao-mist {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.thien-kiep-khai-bao-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.thien-kiep-khai-bao-sky {
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 228, 142, 0.12), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 24%, transparent 74%, rgba(0, 0, 0, 0.34)),
        linear-gradient(180deg, rgba(5, 7, 11, 0.04), rgba(5, 7, 11, 0.34));
    opacity: 0.72;
}

.thien-kiep-khai-bao-mist {
    top: auto;
    height: 42%;
    background:
        radial-gradient(ellipse at 38% 92%, rgba(208, 215, 220, 0.2), transparent 56%),
        linear-gradient(0deg, rgba(202, 207, 212, 0.16), transparent 72%);
    filter: blur(2px);
}

.thien-kiep-khai-bao-topbar {
    position: relative;
    z-index: 8;
    height: 132px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4.2vw 0;
}

.thien-kiep-khai-bao-title-wrap,
.thien-kiep-khai-bao-currencies,
.thien-kiep-khai-bao-currencies span {
    display: flex;
    align-items: center;
}

.thien-kiep-khai-bao-title-wrap {
    gap: 16px;
}

.thien-kiep-khai-bao-site-logo {
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.48));
    transform: translateY(18px);
}

.thien-kiep-khai-bao-site-logo.compact {
    height: 82px;
}

.thien-kiep-khai-bao-site-logo.wide {
    height: 158px;
    display: none;
}

@media (min-width: 640px) {
    .thien-kiep-khai-bao-site-logo.compact {
        display: none;
    }

    .thien-kiep-khai-bao-site-logo.wide {
        display: block;
    }
}

.thien-kiep-khai-bao-title-wrap p,
.thien-kiep-khai-bao-rule-block p,
.thien-kiep-khai-bao-rate-list span {
    color: rgba(230, 232, 238, 0.62);
}

.thien-kiep-khai-bao-title-wrap h1 {
    margin: 0;
    color: #fff;
    font-family: "Signika", sans-serif;
    font-size: clamp(2rem, 3.2vw, 4.4rem);
    line-height: 1;
    font-weight: 500;
}

.thien-kiep-khai-bao-title-wrap p {
    margin: 0 0 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.thien-kiep-khai-bao-currencies {
    gap: 18px;
    color: #fff;
}

.thien-kiep-khai-bao-currencies span {
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.28);
    background: rgba(0, 0, 0, 0.2);
}

.thien-kiep-khai-bao-currencies b {
    color: #f0d878;
    font-weight: 500;
}

.thien-kiep-khai-bao-exit {
    color: #f3f4f6;
    font-size: 2.3rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.thien-kiep-khai-bao-exit:hover {
    color: #f0d878;
    transform: translateX(-3px);
}

.thien-kiep-khai-bao-hero {
    position: absolute;
    z-index: 5;
    inset: 11vh 23vw 16vh 6vw;
    display: grid;
    place-items: center;
}

.thien-kiep-khai-bao-sigil {
    position: absolute;
    width: min(42vw, 560px);
    aspect-ratio: 1;
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(212, 175, 55, 0.09), transparent 34%),
        conic-gradient(from 22deg, transparent, rgba(212, 175, 55, 0.24), transparent 22%, transparent 64%, rgba(145, 186, 255, 0.2), transparent);
    filter: blur(1px);
    opacity: 0.74;
    animation: thien-kiep-khai-bao-spin 24s linear infinite;
}

.thien-kiep-khai-bao-pet {
    position: relative;
    z-index: 2;
    width: min(40vw, 560px);
    max-height: 62vh;
    object-fit: contain;
    filter:
        drop-shadow(0 28px 36px rgba(0, 0, 0, 0.45))
        drop-shadow(0 0 30px rgba(212, 175, 55, 0.22));
}

.thien-kiep-khai-bao-hero-copy {
    position: absolute;
    left: 9%;
    bottom: 4%;
    z-index: 3;
    max-width: 420px;
}

.thien-kiep-khai-bao-tier {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 18px;
    color: #3a2307;
    font-family: "Signika", sans-serif;
    font-weight: 700;
    background: linear-gradient(90deg, #f0d878, #b47d25);
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.18);
}

.thien-kiep-khai-bao-hero-copy h2 {
    margin: 0;
    color: #fff;
    font-family: "Signika", sans-serif;
    font-size: clamp(2.1rem, 4vw, 5rem);
    font-weight: 500;
    line-height: 1;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.thien-kiep-khai-bao-hero-copy p {
    margin: 12px 0 0;
    max-width: 32rem;
    color: rgba(245, 247, 252, 0.72);
    font-size: 1.05rem;
}

.thien-kiep-khai-bao-info-panel {
    position: absolute;
    z-index: 7;
    right: 3.6vw;
    top: 15vh;
    width: min(430px, 28vw);
    max-height: 66vh;
    padding: 22px 24px;
    overflow: hidden;
    border-left: 1px solid rgba(212, 175, 55, 0.24);
    background:
        linear-gradient(180deg, rgba(7, 8, 12, 0.86), rgba(12, 13, 18, 0.62)),
        radial-gradient(circle at 100% 0, rgba(212, 175, 55, 0.08), transparent 36%);
    backdrop-filter: blur(12px);
}

.thien-kiep-khai-bao-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.thien-kiep-khai-bao-tabs button {
    padding: 0 0 9px;
    border: 0;
    color: rgba(240, 243, 248, 0.65);
    background: transparent;
    font-size: 1.05rem;
    cursor: pointer;
}

.thien-kiep-khai-bao-tabs .active {
    color: #d4af37;
    border-bottom: 1px solid #d4af37;
}

.thien-kiep-khai-bao-rule-block {
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.thien-kiep-khai-bao-rule-block h3 {
    margin: 0 0 12px;
    color: #fff;
    font-family: "Signika", sans-serif;
    font-size: 1.45rem;
    font-weight: 500;
}

.thien-kiep-khai-bao-rule-block p {
    margin: 0;
    line-height: 1.7;
}

.thien-kiep-khai-bao-rule-block strong {
    display: block;
    margin-top: 18px;
    color: #f0d878;
    font-weight: 500;
}

.thien-kiep-khai-bao-rate-list {
    display: grid;
    gap: 13px;
    padding-top: 24px;
}

.thien-kiep-khai-bao-tab-panel {
    display: none;
}

.thien-kiep-khai-bao-tab-panel.active {
    display: block;
}

.thien-kiep-khai-bao-rule-block.compact {
    margin-top: 22px;
    padding-bottom: 0;
    border-bottom: 0;
}

.thien-kiep-khai-bao-rate-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.thien-kiep-khai-bao-rate-list b {
    color: #fff;
    font-weight: 500;
}

.thien-kiep-khai-bao-rate-summary {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.thien-kiep-khai-bao-history-empty {
    display: grid;
    gap: 14px;
    padding-top: 24px;
    color: rgba(245, 247, 252, 0.72);
}

.thien-kiep-khai-bao-history-empty strong {
    color: #fff;
    font-weight: 500;
}

.thien-kiep-khai-bao-history-empty button,
.thien-kiep-khai-bao-history-fab,
.thien-kiep-khai-bao-shop-fab,
.thien-kiep-khai-bao-reward-preview-fab,
.thien-kiep-khai-bao-history-pager button {
    min-height: 42px;
    border: 1px solid rgba(240, 216, 120, 0.42);

    color: #17120a;
    background: linear-gradient(90deg, #d9a83d, #ffe28a);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.thien-kiep-khai-bao-history-empty button:hover,
.thien-kiep-khai-bao-history-fab:hover,
.thien-kiep-khai-bao-shop-fab:hover,
.thien-kiep-khai-bao-reward-preview-fab:hover,
.thien-kiep-khai-bao-history-pager button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.thien-kiep-khai-bao-history-fab {
    position: fixed;
    z-index: 12;
    left: 24px;
    bottom: 24px;
    min-width: 112px;
    padding: 0 18px;
    font-weight: 700;
}

.thien-kiep-khai-bao-shop-fab {
    position: fixed;
    z-index: 12;
    left: 152px;
    bottom: 24px;
    min-width: 112px;
    padding: 0 18px;
    font-weight: 700;
}

.thien-kiep-khai-bao-reward-preview-fab {
    position: fixed;
    z-index: 12;
    left: 280px;
    bottom: 24px;
    min-width: 168px;
    padding: 0 18px;
    font-weight: 700;
}

.thien-kiep-khai-bao-shop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    overflow: hidden;
    color: #f8fafc;
    background: #0a0d11;
}

.thien-kiep-khai-bao-shop.open {
    display: block;
}

.thien-kiep-khai-bao-shop-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 58%, rgba(185, 196, 205, 0.18), transparent 24%),
        radial-gradient(circle at 58% 46%, rgba(212, 175, 55, 0.08), transparent 20%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(13, 18, 23, 0.88) 36%, rgba(10, 12, 16, 0.94));
}

.thien-kiep-khai-bao-shop-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.12), transparent 38%);
    pointer-events: none;
}

.thien-kiep-khai-bao-shop-topbar {
    position: relative;
    z-index: 2;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 58px 0 66px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.thien-kiep-khai-bao-shop-tabs {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.2vw, 36px);
    color: rgba(245, 247, 252, 0.68);
    font-size: clamp(1.05rem, 1.4vw, 1.55rem);
}

.thien-kiep-khai-bao-shop-tabs strong {
    color: #d9a83d;
    font-weight: 500;
    text-shadow: 0 0 18px rgba(217, 168, 61, 0.28);
}

.thien-kiep-khai-bao-shop-balance {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(245, 247, 252, 0.72);
}

.thien-kiep-khai-bao-shop-balance b {
    color: #fff;
    font-size: 1.4rem;
}

.thien-kiep-khai-bao-shop-balance button {
    margin-left: 40px;
    border: 0;
    color: rgba(245, 247, 252, 0.88);
    background: transparent;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
}

.thien-kiep-khai-bao-shop-sidebar {
    position: absolute;
    z-index: 2;
    left: 42px;
    top: 150px;
    width: 126px;
}

.thien-kiep-khai-bao-shop-sidebar button {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 0;
    color: rgba(245, 247, 252, 0.72);
    background: transparent;
}

.thien-kiep-khai-bao-shop-sidebar span {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(217, 168, 61, 0.82), rgba(78, 64, 36, 0.66));
    color: #15110a;
    font-size: 2rem;
}

.thien-kiep-khai-bao-shop-sidebar b {
    font-weight: 500;
    text-align: center;
}

.thien-kiep-khai-bao-shop-list {
    position: absolute;
    z-index: 2;
    left: 198px;
    top: 162px;
    bottom: 48px;
    width: min(400px, 28vw);
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: auto;
    padding-right: 8px;
}

.thien-kiep-khai-bao-shop-item {
    position: relative;
    min-height: 190px;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    align-items: center;
    justify-items: start;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.18), rgba(0, 0, 0, 0.34)),
        rgba(12, 13, 16, 0.86);
    box-shadow: inset 0 -22px 40px rgba(217, 168, 61, 0.14);
    cursor: pointer;
}

.thien-kiep-khai-bao-shop-item.active {
    border-color: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 -24px 48px rgba(217, 168, 61, 0.22),
        0 0 28px rgba(255, 255, 255, 0.18);
}

.thien-kiep-khai-bao-shop-item.reward-preview.legendary {
    background:
        linear-gradient(180deg, rgba(255, 226, 122, 0.24), rgba(0, 0, 0, 0.36)),
        rgba(12, 13, 16, 0.9);
    box-shadow: inset 0 -24px 50px rgba(255, 179, 0, 0.18);
}

.thien-kiep-khai-bao-shop-item.reward-preview.epic {
    background:
        linear-gradient(180deg, rgba(200, 107, 255, 0.2), rgba(0, 0, 0, 0.38)),
        rgba(12, 13, 16, 0.9);
    box-shadow: inset 0 -24px 50px rgba(143, 61, 255, 0.18);
}

.thien-kiep-khai-bao-shop-item.reward-preview.normal {
    background:
        linear-gradient(180deg, rgba(223, 232, 255, 0.16), rgba(0, 0, 0, 0.38)),
        rgba(12, 13, 16, 0.9);
    box-shadow: inset 0 -24px 50px rgba(223, 232, 255, 0.1);
}

.thien-kiep-khai-bao-shop-item.reward-preview.legendary.active {
    box-shadow:
        0 0 0 1px rgba(255, 226, 122, 0.7),
        inset 0 -24px 48px rgba(255, 179, 0, 0.24),
        0 0 34px rgba(255, 179, 0, 0.28);
}

.thien-kiep-khai-bao-shop-item.reward-preview.epic.active {
    box-shadow:
        0 0 0 1px rgba(200, 107, 255, 0.7),
        inset 0 -24px 48px rgba(143, 61, 255, 0.24),
        0 0 34px rgba(143, 61, 255, 0.28);
}

.thien-kiep-khai-bao-shop-item span {
    padding: 4px 8px;
    color: #1b1406;
    background: #e6c56a;
    font-size: 0.95rem;
}

.thien-kiep-khai-bao-shop-item img {
    justify-self: center;
    max-width: 58%;
    max-height: 94px;
    object-fit: contain;
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.42));
}

.thien-kiep-khai-bao-shop-item img.empty {
    display: none;
}

.thien-kiep-khai-bao-shop-item small {
    margin-left: 14px;
    color: rgba(245, 247, 252, 0.82);
    font-size: 1rem;
}

.thien-kiep-khai-bao-shop-item strong {
    margin: 0 14px 12px;
    font-size: 1.2rem;
    font-weight: 500;
}

.thien-kiep-khai-bao-shop-empty {
    padding: 28px;
    color: rgba(245, 247, 252, 0.66);
    background: rgba(0, 0, 0, 0.36);
}

.thien-kiep-khai-bao-shop-preview {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: min(38vw, 620px);
    height: min(48vh, 520px);
    display: grid;
    place-items: center;
    transform: translate(-38%, -48%);
}

.thien-kiep-khai-bao-shop-preview::before {
    content: "";
    position: absolute;
    width: min(28vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 64%);
}

.thien-kiep-khai-bao-shop-preview img {
    position: relative;
    max-width: 72%;
    max-height: 72%;
    object-fit: contain;
    filter:
        drop-shadow(0 34px 44px rgba(0, 0, 0, 0.54))
        drop-shadow(0 0 30px rgba(217, 168, 61, 0.16));
}

.thien-kiep-khai-bao-shop-preview img.empty {
    display: none;
}

.thien-kiep-khai-bao-shop-detail {
    position: absolute;
    z-index: 2;
    right: 5vw;
    bottom: 70px;
    width: min(380px, 25vw);
    display: grid;
    gap: 20px;
}

.thien-kiep-khai-bao-shop-detail h2 {
    margin: 0;
    padding-left: 14px;
    border-left: 4px solid #d9a83d;
    color: #fff;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 500;
}

.thien-kiep-khai-bao-shop-cost {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.thien-kiep-khai-bao-shop-cost p {
    margin: 0;
    color: rgba(245, 247, 252, 0.46);
    font-size: 1.1rem;
}

.thien-kiep-khai-bao-shop-cost div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.thien-kiep-khai-bao-shop-cost img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    background: linear-gradient(180deg, rgba(217, 168, 61, 0.28), rgba(0, 0, 0, 0.34));
}

.thien-kiep-khai-bao-shop-cost strong {
    font-size: 1.35rem;
    font-weight: 500;
}

.thien-kiep-khai-bao-shop-cost span {
    margin-left: auto;
    color: #ff7b7b;
}

.thien-kiep-khai-bao-reward-preview-detail .thien-kiep-khai-bao-tier-label {
    margin: 0;
    font-size: 1.35rem;
}

.thien-kiep-khai-bao-reward-preview-detail span {
    color: rgba(245, 247, 252, 0.72);
}

.thien-kiep-khai-bao-shop-exchange {
    justify-self: end;
    min-width: 230px;
    min-height: 52px;
    border: 0;
    color: #111318;
    background: linear-gradient(90deg, rgba(238, 238, 238, 0.74), rgba(255, 255, 255, 0.48));
    font-size: 1.05rem;
    cursor: pointer;
}

.thien-kiep-khai-bao-shop-exchange:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.thien-kiep-khai-bao-shop-detail small {
    min-height: 20px;
    color: #ff9c9c;
    text-align: right;
}

.thien-kiep-khai-bao-modal-card.thien-kiep-khai-bao-history-card {
    box-sizing: border-box;
    width: min(1040px, calc(100vw - 96px));
    max-width: calc(100vw - 96px);
    min-height: 660px;
    align-content: start;
    gap: 18px;
    padding: 36px 44px 32px;
    overflow: visible;
    border-color: rgba(212, 175, 55, 0.28);
    background:
        linear-gradient(180deg, rgba(38, 41, 44, 0.72), rgba(15, 17, 20, 0.84)),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.12), transparent 54%);
    backdrop-filter: blur(10px);
    text-align: left;
}

.thien-kiep-khai-bao-modal-card.thien-kiep-khai-bao-history-card p {
    color: rgba(245, 247, 252, 0.72);
    letter-spacing: 0.08em;
    text-transform: none;
    text-align: center;
}

.thien-kiep-khai-bao-history-table {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 8px;
    min-height: 486px;
    overflow: visible;
}

.thien-kiep-khai-bao-history-head,
.thien-kiep-khai-bao-history-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 230px;
    align-items: center;
    gap: 18px;
}

.thien-kiep-khai-bao-history-head {
    min-height: 38px;
    padding: 0 18px;
    color: rgba(245, 247, 252, 0.48);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    font-size: 0.98rem;
    letter-spacing: 0.04em;
}

.thien-kiep-khai-bao-history-list {
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(10, minmax(38px, 1fr));
    gap: 5px;
}

.thien-kiep-khai-bao-history-row {
    min-height: 42px;
    padding: 0 18px;
    color: #f8fafc;
    background: rgba(6, 8, 12, 0.48);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.thien-kiep-khai-bao-history-row:nth-child(even) {
    background: rgba(16, 18, 24, 0.5);
}

.thien-kiep-khai-bao-history-row span,
.thien-kiep-khai-bao-history-row b,
.thien-kiep-khai-bao-history-row small {
    overflow-wrap: anywhere;
}

.thien-kiep-khai-bao-history-row span {
    font-weight: 600;
}

.thien-kiep-khai-bao-history-row b {
    font-weight: 600;
    text-align: center;
}

.thien-kiep-khai-bao-history-row small {
    color: rgba(245, 247, 252, 0.76);
    font-size: 0.95rem;
    font-style: italic;
    text-align: center;
}

.thien-kiep-khai-bao-history-row.legendary span,
.thien-kiep-khai-bao-history-row.legendary b,
.thien-kiep-khai-bao-history-row.legendary small {
    color: #f0d878;
    text-shadow: 0 0 12px rgba(240, 216, 120, 0.24);
}

.thien-kiep-khai-bao-history-row.epic {
    background: linear-gradient(90deg, rgba(192, 132, 252, 0.24), rgba(192, 132, 252, 0.13));
}

.thien-kiep-khai-bao-history-row.epic span,
.thien-kiep-khai-bao-history-row.epic b,
.thien-kiep-khai-bao-history-row.epic small {
    color: #d7b2ff;
    text-shadow: 0 0 12px rgba(192, 132, 252, 0.35);
}

.thien-kiep-khai-bao-history-row.empty {
    grid-template-columns: 160px minmax(0, 1fr) 230px;
    color: rgba(245, 247, 252, 0.62);
}

.thien-kiep-khai-bao-history-pager {
    display: grid;
    grid-template-columns: 40px 72px 40px;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 2px;
}

.thien-kiep-khai-bao-history-pager span {
    min-height: 34px;
    display: grid;
    place-items: center;
    color: rgba(245, 247, 252, 0.86);
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
}

.thien-kiep-khai-bao-history-pager button {
    min-height: 34px;
    padding: 0;
    border: 0;
    color: rgba(245, 247, 252, 0.72);
    background: transparent;
    box-shadow: none;
    font-size: 2rem;
}

.thien-kiep-khai-bao-history-pager button:disabled {
    cursor: not-allowed;
    opacity: 0.2;
    transform: none;
    filter: none;
}

.thien-kiep-khai-bao-history-card > small {
    min-height: 18px;
    color: #fca5a5;
    text-align: center;
}

.thien-kiep-khai-bao-tier-label {
    font-weight: 700;
}

.thien-kiep-khai-bao-tier-label.legendary {
    color: #ffd94f;
    text-shadow: 0 0 12px rgba(255, 217, 79, 0.45);
}

.thien-kiep-khai-bao-tier-label.epic {
    color: #c084fc;
    text-shadow: 0 0 12px rgba(192, 132, 252, 0.42);
}

.thien-kiep-khai-bao-tier-label.normal {
    color: #f8fafc;
}

.thien-kiep-khai-bao-preview-strip {
    position: absolute;
    z-index: 7;
    left: 6vw;
    right: 31vw;
    bottom: 14vh;
    display: flex;
    gap: 12px;
}

.thien-kiep-khai-bao-reward {
    width: 150px;
    min-height: 104px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18));
    color: rgba(245, 247, 252, 0.78);
}

.thien-kiep-khai-bao-reward.legendary {
    border-color: rgba(212, 175, 55, 0.54);
    box-shadow: inset 0 -18px 28px rgba(212, 175, 55, 0.12);
}

.thien-kiep-khai-bao-reward img,
.thien-kiep-khai-bao-fruit {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.thien-kiep-khai-bao-fruit {
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #24180a;
    background: radial-gradient(circle at 35% 28%, #fff4bc, #d4af37 52%, #7d551a);
    font-family: "Signika", sans-serif;
    font-weight: 800;
}

.thien-kiep-khai-bao-reward span {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thien-kiep-khai-bao-actions {
    position: absolute;
    z-index: 8;
    left: 26vw;
    right: 26vw;
    bottom: 4.2vh;
    display: grid;
    grid-template-columns: 1fr 1.05fr 1.18fr;
    align-items: center;
    gap: 18px;
}

.thien-kiep-khai-bao-pity {
    display: grid;
    gap: 8px;
    color: #f0d878;
}

.thien-kiep-khai-bao-pity div {
    height: 7px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: rgba(255, 255, 255, 0.1);
}

.thien-kiep-khai-bao-pity i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #8a6d1f, #d4af37);
}

.thien-kiep-khai-bao-draw {
    min-height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #111318;
    font-size: clamp(1rem, 1.25vw, 1.35rem);
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.thien-kiep-khai-bao-draw:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.thien-kiep-khai-bao-draw:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
    filter: grayscale(0.25);
}

.thien-kiep-khai-bao-draw.secondary {
    background: rgba(245, 247, 252, 0.76);
}

.thien-kiep-khai-bao-draw.primary {
    background: linear-gradient(90deg, #c99a40, #efc770);
}

.thien-kiep-khai-bao-draw kbd {
    margin-right: 10px;
    padding: 3px 9px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.36);
    font-size: 0.8em;
}

.thien-kiep-khai-bao-draw [data-draw-label] {
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.thien-kiep-khai-bao-draw.not-enough-token [data-draw-label] {
    color: #dc2626;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.42);
}

.thien-kiep-khai-bao-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    place-items: center;
    padding: 22px;
}

.thien-kiep-khai-bao-modal.open {
    display: grid;
}

.thien-kiep-khai-bao-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(8px);
}

.thien-kiep-khai-bao-modal-card {
    position: relative;
    width: min(460px, 100%);
    min-height: 260px;
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 38px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background:
        radial-gradient(circle at 50% 0, rgba(212, 175, 55, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(15, 17, 23, 0.98), rgba(7, 8, 12, 0.96));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(212, 175, 55, 0.08);
    text-align: center;
}

.thien-kiep-khai-bao-modal-card p {
    margin: 0;
    color: #f0d878;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.thien-kiep-khai-bao-modal-card h2 {
    margin: 0;
    color: #fff;
    font-family: "Signika", sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
}

.thien-kiep-khai-bao-modal-card span {
    color: rgba(245, 247, 252, 0.72);
    line-height: 1.7;
}

.thien-kiep-khai-bao-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.thien-kiep-khai-bao-modal-close:hover {
    color: #f0d878;
}

.thien-kiep-khai-bao-calamity {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    overflow: hidden;
    background: #000;
    perspective: 1200px;
}

.thien-kiep-khai-bao-calamity.playing {
    display: block;
}

.thien-kiep-khai-bao-calamity.idle-background {
    background: #000;
}

.thien-kiep-khai-bao-calamity video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    transition: opacity 0.3s ease;
}

.thien-kiep-khai-bao-calamity video[data-calamity-idle-video] {
    opacity: 0;
}

.thien-kiep-khai-bao-calamity.idle-background video[data-calamity-video] {
    opacity: 0;
}

.thien-kiep-khai-bao-calamity.idle-background video[data-calamity-idle-video] {
    opacity: 0.96;
}

.thien-kiep-khai-bao-calamity::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 229, 139, 0.32), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
    mix-blend-mode: screen;
}

.thien-kiep-khai-bao-storm,
.thien-kiep-khai-bao-lightning {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.thien-kiep-khai-bao-storm {
    overflow: hidden;
}

.thien-kiep-khai-bao-cloud {
    position: absolute;
    left: var(--cloud-start-x);
    top: var(--cloud-start-y);
    width: clamp(260px, 23vw, 560px);
    height: auto;
    opacity: 0;
    filter:
        brightness(1.45)
        contrast(0.78)
        drop-shadow(0 12px 24px rgba(255, 255, 255, 0.18));
    mix-blend-mode: screen;
    transform: translate(-50%, -50%) scale(0.72);
    animation: thien-kiep-khai-bao-cloud-gather 3s cubic-bezier(0.19, 0.78, 0.24, 1) var(--cloud-delay) both;
}

.thien-kiep-khai-bao-lightning {
    z-index: 4;
    overflow: hidden;
}

.thien-kiep-khai-bao-lightning-bolt {
    position: absolute;
    left: var(--bolt-x);
    top: -8vh;
    width: clamp(260px, 28vw, 540px);
    display: block;
    opacity: 0;
    mix-blend-mode: screen;
    transform: translateX(-50%) rotate(var(--bolt-tilt)) scaleY(1.4);
    animation: thien-kiep-khai-bao-lightning-drop var(--bolt-duration) ease-out both;
}

.thien-kiep-khai-bao-lightning-bolt img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.thien-kiep-khai-bao-lightning-bolt.normal {
    filter:
        brightness(1.9)
        contrast(1.4)
        drop-shadow(0 0 18px #dfe8ff)
        drop-shadow(0 0 42px rgba(223, 232, 255, 0.86));
}

.thien-kiep-khai-bao-lightning-bolt.epic {
    filter:
        brightness(1.55)
        contrast(1.35)
        sepia(0.35)
        saturate(2.8)
        hue-rotate(226deg)
        drop-shadow(0 0 20px #c86bff)
        drop-shadow(0 0 54px rgba(143, 61, 255, 0.92));
}

.thien-kiep-khai-bao-lightning-bolt.legendary {
    filter:
        brightness(1.72)
        contrast(1.35)
        sepia(0.85)
        saturate(2.2)
        hue-rotate(354deg)
        drop-shadow(0 0 20px #ffe27a)
        drop-shadow(0 0 58px rgba(255, 179, 0, 0.95));
}

.thien-kiep-khai-bao-skip-hint {
    position: absolute;
    left: 50%;
    bottom: 7vh;
    z-index: 6;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: rgba(245, 247, 252, 0.72);
    background: rgba(0, 0, 0, 0.34);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.thien-kiep-khai-bao-calamity.storm-running .thien-kiep-khai-bao-skip-hint {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.thien-kiep-khai-bao-card-stage {
    position: absolute;
    inset: 7vh 5vw 7vh;
    z-index: 5;
}

.thien-kiep-khai-bao-card-actions {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: min(85vh, calc(69% + clamp(92px, 9.2vw, 148px) * 1.05));
    right: auto;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.thien-kiep-khai-bao-calamity.cards-ready .thien-kiep-khai-bao-card-actions {
    opacity: 1;
    pointer-events: auto;
}

.thien-kiep-khai-bao-card-action {
    min-height: 44px;
    padding: 0 18px;

    color: #f8fafc;
    background: rgba(0, 0, 0, 0.46);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.thien-kiep-khai-bao-card-action:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.thien-kiep-khai-bao-card-action.primary {
    color: #17120a;
    border-color: rgba(255, 217, 91, 0.58);
    background: linear-gradient(90deg, #d9a83d, #ffe28a);
}

.thien-kiep-khai-bao-card-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.35);
}

.thien-kiep-khai-bao-card-close {
    z-index: 6;
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(240, 216, 120, 0.48);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
}

.thien-kiep-khai-bao-flip-card {
    position: absolute;
    left: var(--card-x);
    top: var(--card-y);
    width: clamp(110px, 10.8vw, 176px);
    aspect-ratio: 430 / 640;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.12);
    transform-style: preserve-3d;
    filter:
        drop-shadow(0 18px 22px rgba(0, 0, 0, 0.52))
        drop-shadow(0 0 18px rgba(255, 228, 142, 0.18));
}

.thien-kiep-khai-bao-flip-card.landed {
    opacity: 1;
    transition: filter 0.25s ease, transform 0.25s ease;
}

.thien-kiep-khai-bao-flip-card.landed:hover {
    filter:
        drop-shadow(0 22px 28px rgba(0, 0, 0, 0.58))
        drop-shadow(0 0 26px rgba(255, 228, 142, 0.36));
}

.thien-kiep-khai-bao-flip-inner {
    position: absolute;
    inset: 0;
    display: block;
    transform-style: preserve-3d;
    transition: transform 0.72s cubic-bezier(0.2, 0.84, 0.26, 1);
}

.thien-kiep-khai-bao-flip-card.revealed .thien-kiep-khai-bao-flip-inner {
    transform: rotateY(180deg);
}

.thien-kiep-khai-bao-flip-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    backface-visibility: hidden;
}

.thien-kiep-khai-bao-flip-face > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.thien-kiep-khai-bao-flip-up {
    transform: rotateY(180deg);
}

.thien-kiep-khai-bao-card-reward {
    position: absolute;
    inset: 20% 12% 17%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.72);
}

.thien-kiep-khai-bao-card-icon {
    width: min(48%, 58px);
    height: auto;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
}

.thien-kiep-khai-bao-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thien-kiep-khai-bao-card-reward strong {
    max-width: 100%;
    color: #fff;
    font-size: clamp(0.68rem, 0.86vw, 0.92rem);
    font-weight: 700;
    line-height: 1.15;
}

.thien-kiep-khai-bao-card-reward small {
    color: rgba(255, 244, 190, 0.84);
    font-size: clamp(0.58rem, 0.72vw, 0.78rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.thien-kiep-khai-bao-flip-card.legendary {
    filter:
        drop-shadow(0 20px 26px rgba(0, 0, 0, 0.68))
        drop-shadow(0 0 34px rgba(255, 205, 43, 0.68))
        drop-shadow(0 0 70px rgba(255, 173, 31, 0.4));
}

.thien-kiep-khai-bao-flip-card.epic {
    filter:
        drop-shadow(0 20px 26px rgba(0, 0, 0, 0.68))
        drop-shadow(0 0 34px rgba(176, 112, 255, 0.66))
        drop-shadow(0 0 66px rgba(126, 34, 206, 0.42));
}

.thien-kiep-khai-bao-flip-card.normal {
    filter:
        drop-shadow(0 20px 26px rgba(0, 0, 0, 0.68))
        drop-shadow(0 0 26px rgba(255, 255, 255, 0.32));
}

.thien-kiep-khai-bao-calamity-flash {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 1), rgba(255, 244, 196, 0.98) 22%, rgba(255, 221, 92, 0.72) 42%, rgba(255, 255, 255, 0.34) 64%, transparent 84%),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
    mix-blend-mode: screen;
    z-index: 7;
}

.thien-kiep-khai-bao-calamity-flash.active {
    animation: thien-kiep-khai-bao-reveal-flash 1.05s ease-out forwards;
}

.thien-kiep-khai-bao-buy-card {
    gap: 18px;
}

.thien-kiep-khai-bao-buy-control {
    display: grid;
    gap: 12px;
}

.thien-kiep-khai-bao-buy-control input {
    width: 100%;
    accent-color: #d4af37;
}

.thien-kiep-khai-bao-buy-control div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #f8fafc;
}

.thien-kiep-khai-bao-buy-card small {
    min-height: 20px;
    color: #ef5350;
}

.thien-kiep-khai-bao-result-modal {
    position: fixed;
    inset: 0;
    z-index: 42;
    display: none;
    place-items: center;
    padding: 22px;
}

.thien-kiep-khai-bao-result-modal.open {
    display: grid;
}

.thien-kiep-khai-bao-result-card {
    position: relative;
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow: auto;
    padding: 34px;
    border: 1px solid rgba(212, 175, 55, 0.48);
    background:
        radial-gradient(circle at 50% 0, rgba(212, 175, 55, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(16, 18, 24, 0.98), rgba(6, 7, 11, 0.97));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), inset 0 0 42px rgba(212, 175, 55, 0.08);
}

.thien-kiep-khai-bao-result-card > p {
    margin: 0;
    color: #f0d878;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.thien-kiep-khai-bao-result-card h2 {
    margin: 8px 0 26px;
    color: #fff;
    font-family: "Signika", sans-serif;
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 500;
    text-align: center;
}

.thien-kiep-khai-bao-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
}

.thien-kiep-khai-bao-result-item {
    min-height: 150px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 16px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(0, 0, 0, 0.16);
    animation: thien-kiep-khai-bao-result-pop 0.34s ease-out both;
}

.thien-kiep-khai-bao-result-item.legendary {
    border-color: rgba(240, 216, 120, 0.72);
    background:
        radial-gradient(circle at 50% 10%, rgba(240, 216, 120, 0.32), transparent 42%),
        linear-gradient(180deg, rgba(212, 175, 55, 0.16), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 0 26px rgba(212, 175, 55, 0.16), 0 0 24px rgba(212, 175, 55, 0.16);
}

.thien-kiep-khai-bao-result-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
}

.thien-kiep-khai-bao-result-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thien-kiep-khai-bao-result-item strong {
    color: #fff;
    font-weight: 500;
    text-align: center;
}

.thien-kiep-khai-bao-result-item span {
    color: rgba(230, 232, 238, 0.58);
    font-size: 0.9rem;
}

.thien-kiep-khai-bao-result-item.legendary span,
.thien-kiep-khai-bao-result-item.legendary strong {
    color: #f0d878;
}

@keyframes thien-kiep-khai-bao-shake {
    0%, 100% { transform: translate(0, 0); }
    15% { transform: translate(-8px, 4px); }
    30% { transform: translate(6px, -5px); }
    45% { transform: translate(-5px, -3px); }
    60% { transform: translate(7px, 3px); }
    78% { transform: translate(-3px, 2px); }
}

@keyframes thien-kiep-khai-bao-reveal-flash {
    0% { opacity: 0; transform: scale(0.74); }
    12% { opacity: 1; transform: scale(1); }
    34% { opacity: 0.94; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1.34); }
}

@keyframes thien-kiep-khai-bao-result-pop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes thien-kiep-khai-bao-spin {
    to { transform: rotate(360deg); }
}

@keyframes thien-kiep-khai-bao-cloud-gather {
    0% {
        opacity: 0;
        filter: brightness(1.55) contrast(0.75) drop-shadow(0 12px 24px rgba(255, 255, 255, 0.18));
        transform: translate(-50%, -50%) scale(0.64);
    }
    28% {
        opacity: 0.86;
        filter: brightness(1.25) contrast(0.88) grayscale(0.2) drop-shadow(0 12px 28px rgba(255, 255, 255, 0.14));
    }
    68% {
        opacity: 0.96;
        filter: brightness(0.86) contrast(1.02) grayscale(0.48) sepia(0.08) hue-rotate(176deg) drop-shadow(0 18px 34px rgba(23, 34, 46, 0.36));
    }
    100% {
        left: var(--cloud-end-x);
        top: var(--cloud-end-y);
        opacity: 0.98;
        filter: brightness(0.64) contrast(1.08) grayscale(0.58) sepia(0.12) hue-rotate(176deg) drop-shadow(0 22px 42px rgba(22, 34, 48, 0.58));
        mix-blend-mode: normal;
        transform: translate(-50%, -50%) scale(calc(var(--cloud-scale) * 1.06));
    }
}

@keyframes thien-kiep-khai-bao-lightning-drop {
    0% {
        opacity: 0;
        transform: translate(-50%, -18%) rotate(var(--bolt-tilt)) scaleY(0.9);
    }
    14% {
        opacity: 1;
    }
    76% {
        opacity: 1;
        transform: translate(-50%, 18%) rotate(var(--bolt-tilt)) scaleY(1.48);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 28%) rotate(var(--bolt-tilt)) scaleY(1.48);
    }
}

@media (max-width: 1100px) {
    .thien-kiep-khai-bao-page-body {
        overflow: auto;
    }

    .thien-kiep-khai-bao-page {
        position: relative;
        min-height: 100vh;
        overflow-y: auto;
        padding-bottom: 28px;
    }

    .thien-kiep-khai-bao-topbar,
    .thien-kiep-khai-bao-currencies {
        align-items: flex-start;
        flex-direction: column;
    }

    .thien-kiep-khai-bao-topbar {
        height: auto;
        gap: 16px;
        padding: 22px;
    }

    .thien-kiep-khai-bao-site-logo {
        transform: translateY(8px);
    }

    .thien-kiep-khai-bao-site-logo.compact {
        height: 66px;
    }

    .thien-kiep-khai-bao-site-logo.wide {
        height: 82px;
    }

    .thien-kiep-khai-bao-hero,
    .thien-kiep-khai-bao-info-panel,
    .thien-kiep-khai-bao-preview-strip,
    .thien-kiep-khai-bao-actions {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        width: auto;
        margin: 18px 22px;
    }

    .thien-kiep-khai-bao-hero {
        min-height: 420px;
    }

    .thien-kiep-khai-bao-pet {
        width: min(74vw, 430px);
    }

    .thien-kiep-khai-bao-hero-copy {
        left: 0;
        bottom: 0;
    }

    .thien-kiep-khai-bao-info-panel {
        max-height: none;
    }

    .thien-kiep-khai-bao-preview-strip {
        overflow-x: auto;
    }

    .thien-kiep-khai-bao-actions {
        grid-template-columns: 1fr;
    }

    .thien-kiep-khai-bao-modal-card.thien-kiep-khai-bao-history-card {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        min-height: 600px;
        padding: 30px 14px 24px;
    }

    .thien-kiep-khai-bao-shop-fab {
        left: 146px;
    }

    .thien-kiep-khai-bao-reward-preview-fab {
        left: 24px;
        bottom: 76px;
        min-width: 240px;
    }

    .thien-kiep-khai-bao-shop {
        overflow: auto;
    }

    .thien-kiep-khai-bao-shop-topbar {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 22px;
    }

    .thien-kiep-khai-bao-shop-tabs {
        max-width: 100%;
        overflow-x: auto;
        gap: 18px;
        font-size: 1rem;
    }

    .thien-kiep-khai-bao-shop-balance button {
        margin-left: 12px;
    }

    .thien-kiep-khai-bao-shop-sidebar,
    .thien-kiep-khai-bao-shop-list,
    .thien-kiep-khai-bao-shop-preview,
    .thien-kiep-khai-bao-shop-detail {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        width: auto;
        transform: none;
        margin: 18px 22px;
    }

    .thien-kiep-khai-bao-shop-sidebar {
        display: none;
    }

    .thien-kiep-khai-bao-shop-list {
        max-height: 42vh;
    }

    .thien-kiep-khai-bao-shop-preview {
        height: 220px;
    }

    .thien-kiep-khai-bao-shop-detail {
        padding-bottom: 26px;
    }

    .thien-kiep-khai-bao-shop-exchange {
        justify-self: stretch;
    }

    .thien-kiep-khai-bao-history-table,
    .thien-kiep-khai-bao-history-list {
        min-width: 0;
    }

    .thien-kiep-khai-bao-history-head,
    .thien-kiep-khai-bao-history-row,
    .thien-kiep-khai-bao-history-row.empty {
        grid-template-columns: minmax(54px, 0.65fr) minmax(0, 1.35fr) minmax(78px, 0.95fr);
        gap: 8px;
        padding: 0 10px;
        font-size: 0.82rem;
    }

    .thien-kiep-khai-bao-history-row small {
        font-size: 0.76rem;
    }

    .thien-kiep-khai-bao-card-stage {
        inset: 9vh 3vw 8vh;
    }

    .thien-kiep-khai-bao-card-actions {
        left: 50%;
        right: auto;
        top: min(86vh, calc(69% + clamp(68px, 17vw, 112px) * 1.1));
        transform: translateX(-50%);
        justify-content: center;
        flex-wrap: wrap;
        width: min(92vw, 420px);
    }

    .thien-kiep-khai-bao-card-action {
        min-height: 40px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .thien-kiep-khai-bao-flip-card {
        width: clamp(68px, 17vw, 112px);
    }

    .thien-kiep-khai-bao-card-reward {
        inset: 19% 10% 16%;
    }
}
