/* Gaigu Fit - Dark Theme Mobile-First PWA Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

@font-face {
    font-family: 'BlackRose';
    src: url('../fonts/black-rose.woff2') format('woff2');
    font-display: swap;
}

:root {
    --bg: #0f0f10;
    --bg2: #161617;
    --bg3: #1e1e1f;
    --nav: #1a1b1c;
    --border: #3e4042;
    --border2: #3a3b3c;
    --text: #e4e6eb;
    --text2: #b0b3b8;
    --text3: #909192;
    --blue: #4a9eff;
    --blue2: #1877f2;
    --green: #42b72a;
    --red: #f02849;
    --yellow: #e7a400;
    --orange: #e68900;
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.34;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 70px;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

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

input, textarea, select {
    font-family: inherit;
    font-size: 15px !important;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.25);
}

input::placeholder, textarea::placeholder {
    color: var(--text3);
}

button {
    font-family: inherit;
}

/* App Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.top-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 12px;
    max-width: 960px;
    margin: 0 auto;
}

.brand-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.brand-center .logo {
    font-family: 'BlackRose', cursive, sans-serif;
    font-size: 32px;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    user-select: none;
}

.fit-event {
    font-weight: 900;
    letter-spacing: 0.5px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff2d55, #ff9500, #ffd000, #34c759, #5ac8fa, #af52de, #ff2d55);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: fitShimmer 2.6s linear infinite, fitGlow 1.6s ease-in-out infinite alternate;
}

@keyframes fitShimmer {
    to { background-position: 220% center; }
}

@keyframes fitGlow {
    from { filter: drop-shadow(0 0 4px rgba(255, 45, 85, 0.6)); }
    to { filter: drop-shadow(0 0 9px rgba(90, 200, 250, 0.7)); }
}

/* Gamification Star Badge */
.gami-wrap {
    position: relative;
    z-index: 60;
}

.gami-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: #e8365f;
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(232, 54, 95, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.gami-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 54, 95, 0.6);
}

.gami-btn:active {
    transform: translateY(0);
}

.gami-btn .gb-ico {
    font-size: 14px;
    line-height: 1;
}

.gami-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: translateX(-150%) skewX(-20deg);
    animation: gamiShine 3.2s ease-in-out infinite;
}

@keyframes gamiShine {
    0%, 60% { transform: translateX(-150%) skewX(-20deg); }
    100% { transform: translateX(325%) skewX(-20deg); }
}

.gami-btn .gb-txt-short {
    display: none;
}

@media (max-width: 520px) {
    .gami-btn {
        font-size: 12px;
        padding: 6px 9px;
        gap: 4px;
    }
    .gami-btn .gb-txt-full {
        display: none;
    }
    .gami-btn .gb-txt-short {
        display: inline;
    }
    .brand-center {
        gap: 8px;
    }
    .fit-event {
        font-size: 11.5px;
    }
    .brand-center .logo {
        font-size: 26px;
    }
}

.gami-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 120;
    animation: menuFadeIn 0.2s ease-out;
}

.gami-menu.open {
    display: block;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.gami-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 9px;
    transition: background 0.12s;
}

.gami-item:hover {
    background: var(--bg3);
    color: #fff;
}

.gami-item .gi-ico {
    font-size: 17px;
    line-height: 1;
}

/* Search bar dropdown */
#fhSearchBar {
    display: none;
    background: var(--nav);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fh-search-form {
    display: flex;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto;
}

.fh-search-form input {
    flex: 1;
    font-size: 14px !important;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
}

.fh-search-form button {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.fh-search-form button:hover {
    background: var(--blue2);
}

/* Warning Banner */
.fhwarn {
    background: #032b36;
    border-top: 1px solid rgba(34, 211, 238, 0.25);
    border-bottom: 1px solid rgba(34, 211, 238, 0.25);
    padding: 8px 14px;
    text-align: center;
    line-height: 1.5;
    color: var(--text2);
}

.fhwarn .hl {
    color: #e6b45a;
    font-weight: 700;
}

.fhwarn .dom {
    color: #fff;
    font-weight: 700;
}

.fhwarn .sub {
    color: var(--text2);
}

.fhwarn .dgrp {
    white-space: nowrap;
}

.fhwarn .fw-full {
    font-size: 12.5px;
}

.fhwarn .fw-short {
    font-size: clamp(11px, 3.4vw, 13px);
    display: none;
}

@media (max-width: 500px) {
    .fhwarn {
        padding: 7px 10px;
    }
    .fhwarn .fw-full {
        display: none;
    }
    .fhwarn .fw-short {
        display: block;
    }
}

/* Page Container */
.page-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 14px 10px 80px;
}

@media (min-width: 768px) {
    .page-main {
        max-width: 760px;
        padding: 18px 16px 90px;
    }
}

@media (min-width: 1024px) {
    .page-main {
        max-width: 980px;
        padding: 22px 20px 96px;
    }
}

/* Quick Action Buttons Row (fhrow fh5) */
.fhrow {
    display: flex;
    align-items: stretch;
    gap: 7px;
    margin-bottom: 16px;
}

.fhrow.fh5 .fhnear {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    gap: 5px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0;
    background: var(--bg2);
    color: #7db8ff;
    border: 1px solid #3f7fd9;
    border-radius: 11px;
    font-size: clamp(12px, 3.4vw, 13px);
    cursor: pointer;
    white-space: nowrap;
    --gc: 74, 158, 255;
    animation: fh5glow 1.9s ease-in-out infinite;
    transition: transform 0.15s, border-color 0.15s;
}

.fhrow.fh5 .fhnear:nth-child(2) {
    animation-delay: 0.3s;
}

.fhrow.fh5 .fhnear:nth-child(3) {
    animation-delay: 0.6s;
}

.fhrow.fh5 .fhnear:nth-child(4) {
    animation-delay: 0.9s;
}

.fhrow.fh5 .fh5-gg {
    border-color: #c9264a;
    color: #ff8091;
    --gc: 240, 40, 73;
}

.fhrow.fh5 .fh5-fit {
    border-color: #5b4a8a;
    --gc: 175, 82, 222;
}

.fhrow.fh5 .fh5-dg {
    border-color: #8a6d00;
    color: #facc15;
    --gc: 250, 204, 21;
}

.fhrow.fh5 .fhnear::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-150%) skewX(-20deg);
    animation: fh5shine 3s ease-in-out infinite;
    pointer-events: none;
}

.fhrow.fh5 .fhnear:nth-child(2)::after {
    animation-delay: 0.5s;
}

.fhrow.fh5 .fhnear:nth-child(3)::after {
    animation-delay: 1s;
}

.fhrow.fh5 .fhnear:nth-child(4)::after {
    animation-delay: 1.5s;
}

.fhrow.fh5 .fh5i {
    display: inline-flex;
    align-items: center;
    animation: fh5bob 1.2s ease-in-out infinite;
}

.fhrow.fh5 .fh5-fittxt {
    font-weight: 900;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff2d55, #ff9500, #ffd000, #34c759, #5ac8fa, #af52de, #ff2d55);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: fh5sh 2.6s linear infinite;
}

.fhrow.fh5 .fh5-s {
    display: none;
}

@media (max-width: 520px) {
    .fhrow.fh5 {
        gap: 5px;
    }
    .fhrow.fh5 .fh5-l {
        display: none;
    }
    .fhrow.fh5 .fh5-s {
        display: inline;
    }
    .fhrow.fh5 .fhnear {
        font-size: 12px;
        padding: 0 4px;
        gap: 3px;
    }
    .fhrow.fh5 .fhnear svg {
        width: 13px;
        height: 13px;
    }
    .fhrow.fh5 .fh5-dg .fh5i {
        display: none;
    }
    .fhrow.fh5 .fh5-fittxt {
        font-size: 12px;
    }
}

@keyframes fh5glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--gc), 0);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(var(--gc), 0.22), 0 0 16px rgba(var(--gc), 0.55);
    }
}

@keyframes fh5shine {
    0%, 55% { transform: translateX(-150%) skewX(-20deg); }
    100% { transform: translateX(325%) skewX(-20deg); }
}

@keyframes fh5bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes fh5sh {
    to { background-position: 220% center; }
}

/* Quick Province Select Row */
.fhprov-sel {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.fhprov-sel select {
    width: 100%;
    height: 44px;
    background: var(--bg2);
    color: var(--text);
    border: 1px solid #3f7fd9;
    border-radius: 11px;
    padding: 0 34px 0 34px;
    font-size: clamp(12px, 3.4vw, 13px) !important;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: border-color 0.15s;
}

.fhprov-sel select:hover, .fhprov-sel select:focus {
    border-color: var(--blue);
}

.fhprov-sel::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--text3);
    border-bottom: 2px solid var(--text3);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.fhprov-sel::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e9297' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center/contain no-repeat;
    pointer-events: none;
    opacity: 0.8;
    z-index: 1;
}

/* Section Dividers */
.fh-rated-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 32px 2px 14px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    user-select: none;
}

.fh-rated-divider::before, .fh-rated-divider::after {
    content: "";
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

.fh-rated-divider span {
    flex: 0 0 auto;
    padding: 4px 13px;
    color: #facc15;
}

.fh-rated-divider.fh-divider-green span {
    color: #22c55e;
}

.fh-rated-divider.fh-divider-red span {
    color: #ef4444;
}

.fh-rated-divider.fh-divider-blue span {
    color: #4a9eff;
}

.fh-divider-green::before, .fh-divider-green::after {
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.35) 30%, rgba(34, 197, 94, 0.35) 70%, transparent);
}

.fh-divider-red::before, .fh-divider-red::after {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.35) 30%, rgba(239, 68, 68, 0.35) 70%, transparent);
}

.fh-divider-blue::before, .fh-divider-blue::after {
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.35) 30%, rgba(74, 158, 255, 0.35) 70%, transparent);
}

/* Product Cards Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

.product-card {
    background: var(--bg2);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, border-color 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(74, 158, 255, 0.4);
}

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

.product-card .img-wrap {
    position: relative;
    aspect-ratio: 6 / 9;
    background: linear-gradient(90deg, var(--bg3) 25%, #454647 50%, var(--bg3) 75%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s infinite;
    overflow: hidden;
}

@keyframes skel-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.product-card .img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.product-card:hover .img-wrap img {
    transform: scale(1.03);
    filter: brightness(1.08);
}

.hot-ribbon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    background: url('../images/hot-badge.webp') center/contain no-repeat;
    z-index: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    animation: hot-pulse 1.8s infinite;
}

@keyframes hot-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(255, 59, 59, 0.8)); }
}

.video-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info {
    padding: 6px 10px 8px;
}

.product-name {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.product-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    white-space: nowrap;
}

.product-loc {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    min-width: 0;
}

.product-loc span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: #f87171;
    font-size: 13.5px;
    font-weight: 700;
    flex-shrink: 0;
}

.product-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 4px;
    white-space: nowrap;
}

.product-stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.product-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #b0b3b8;
    font-size: 12px;
    font-weight: 400;
    flex-shrink: 0;
}

/* Review Cards (rv-card) */
.rv-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.rv-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rv-avt {
    width: 40px;
    height: 40px;
    border-radius: 20%;
    overflow: hidden;
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.rv-meta {
    flex: 1;
    min-width: 0;
}

.rv-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}

.rv-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.rv-date {
    font-size: 11.5px;
    color: var(--text3);
}

.rv-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rv-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 10px;
}

.rv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.rv-tag {
    font-size: 11.5px;
    font-weight: 600;
    background: var(--bg3);
    color: var(--blue);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.rv-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #facc15;
    text-decoration: none;
    margin-bottom: 12px;
}

.rv-title:hover {
    text-decoration: underline;
}

.rv-imgs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.rv-img-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg3);
    border: 1px solid var(--border);
}

.rv-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.rv-img-thumb:hover img {
    transform: scale(1.08);
}

.rv-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rv-act-btn {
    background: none;
    border: none;
    color: var(--text3);
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.rv-act-btn:hover {
    background: var(--bg3);
    color: var(--text);
}

.rv-act-btn.active {
    color: var(--blue);
}

/* Khu Vực (Provinces) Tab Component */
.kv-hero {
    position: relative;
    border-radius: 12px;
    padding: 28px 20px 24px;
    margin-bottom: 24px;
    background: linear-gradient(150deg, #101826 0%, #0c1220 55%, #101a2e 100%);
    border: 1px solid rgba(77, 159, 255, 0.25);
    overflow: hidden;
}

.kv-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.kv-blob.b1 {
    top: -90px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(45, 136, 255, 0.3), transparent 65%);
    animation: kvFloatA 11s ease-in-out infinite;
}

.kv-blob.b2 {
    bottom: -110px;
    left: -70px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(24, 119, 242, 0.2), transparent 65%);
    animation: kvFloatB 14s ease-in-out infinite;
}

@keyframes kvFloatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-24px, 16px) scale(1.12); }
}

@keyframes kvFloatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -14px) scale(1.08); }
}

.kv-hero h2 {
    position: relative;
    z-index: 1;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 7px;
}

.kv-sub {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    margin-bottom: 16px;
}

.kv-sub b {
    color: #4d9fff;
    font-weight: 800;
}

.kv-search {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.kv-search input {
    width: 100%;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14.5px !important;
    font-weight: 500;
    padding: 0 40px 0 42px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    backdrop-filter: blur(6px);
}

.kv-search input:focus {
    border-color: #4d9fff;
    background: rgba(255, 255, 255, 0.12);
}

.kv-search .kv-mag {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.kv-sec {
    margin-bottom: 28px;
}

.kv-h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 13px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.kv-h2 .kv-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4d9fff;
    flex-shrink: 0;
}

.kv-h2 em {
    font-style: normal;
    font-size: 12px;
    font-weight: 500;
    color: var(--text3);
}

.kv-h2 .kv-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

.kv-topgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 600px) {
    .kv-topgrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kv-topcard {
    position: relative;
    border-radius: 10px;
    padding: 14px 12px;
    border: 1px solid rgba(77, 159, 255, 0.4);
    background: linear-gradient(165deg, #152238, #0e1728);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    cursor: pointer;
}

.kv-topcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(24, 119, 242, 0.28);
    border-color: rgba(77, 159, 255, 0.8);
}

.kv-topcard .kv-rank {
    position: absolute;
    top: -8px;
    right: 4px;
    font-size: 44px;
    font-weight: 900;
    color: rgba(77, 159, 255, 0.14);
    line-height: 1;
    pointer-events: none;
    font-style: italic;
}

.kv-topcard .kv-tname {
    position: relative;
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}

.kv-topcard .kv-tnum {
    position: relative;
    color: #4d9fff;
    font-size: 12px;
    font-weight: 700;
}

.kv-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.kv-chip:hover {
    border-color: rgba(77, 159, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2);
}

.kv-n {
    font-size: 11px;
    font-weight: 700;
    color: #4d9fff;
    background: rgba(24, 119, 242, 0.16);
    padding: 1px 7px;
    border-radius: 4px;
    line-height: 1.5;
}

/* Profile Detail Modal / Sheet */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.profile-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 92vh;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    z-index: 210;
    overflow-y: auto;
    display: none;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
}

@media (min-width: 768px) {
    .profile-modal {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        width: 680px;
        max-height: 88vh;
        border-radius: 16px;
        transform: translate(-50%, -40%) scale(0.95);
        border: 1px solid var(--border);
    }
    .profile-modal.open {
        transform: translate(-50%, -50%) scale(1);
    }
}

.profile-modal.open {
    display: block;
    transform: translateY(0);
}

@media (min-width: 768px) {
    .profile-modal.open {
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-header-bar {
    position: sticky;
    top: 0;
    background: var(--nav);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.modal-close-btn {
    background: var(--bg3);
    border: none;
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn:hover {
    background: #3e4042;
}

/* Lightbox Image Viewer */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-img {
    max-width: 94vw;
    max-height: 94vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Fixed Bottom Navigation Bar (PWA Style) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 90;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    min-height: 54px;
    justify-content: center;
    color: var(--text2);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 3px;
    transition: color 0.15s, border-color 0.15s;
    border-top: 2px solid transparent;
    cursor: pointer;
}

.bottom-nav a.active {
    color: #4d9fff;
    border-top-color: #4d9fff;
    font-weight: 700;
}

.bottom-nav .icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast notification */
.toast-msg {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    background: #1e1e1f;
    border: 1px solid #4a9eff;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-msg.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Page Main Container Responsive 1:1 */
.page-main { max-width:640px; margin:0 auto; padding:12px 10px 80px; }
@media (min-width: 640px) {
    .page-main { max-width:720px; padding:16px 16px 90px; }
}
@media (min-width: 1024px) {
    .page-main { max-width:960px; padding:20px 20px 96px; }
}

/* Album Zone Desktop Reverse Layout 1:1 */
#album-zone { position:relative; }
@media (min-width:768px){
    #album-zone{display:flex;flex-direction:row-reverse;justify-content:center;gap:12px;align-items:flex-start}
    #album-wrap{max-width:420px;flex:0 0 420px;border-radius:12px}
    #album-thumbs{flex-direction:column;width:66px;flex:0 0 66px;max-height:630px;overflow-y:auto;overflow-x:hidden}
}
#album-track::-webkit-scrollbar{display:none}
#album-thumbs::-webkit-scrollbar{display:none}

/* Favorite Button & Pulse Animations */
.fav-btn{position:relative;flex-shrink:0;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;margin-left:4px;border:1px solid var(--border);background:linear-gradient(145deg,#2c2d30,#1c1d1f);cursor:pointer;overflow:hidden;box-shadow:0 3px 8px rgba(0,0,0,0.35),inset 0 1px 0 rgba(255,255,255,0.06);transition:transform .18s cubic-bezier(.34,1.56,.64,1),box-shadow .2s,border-color .2s}
.fav-btn:hover{transform:translateY(-2px);border-color:#f0284955;box-shadow:0 6px 16px rgba(240,40,73,0.25),inset 0 1px 0 rgba(255,255,255,0.08)}
.fav-btn:active{transform:scale(.9)}
.fav-btn .fav-glow{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 50% 40%,rgba(240,40,73,0.35),transparent 70%);opacity:0;transition:opacity .25s}
.fav-btn.faved{background:linear-gradient(145deg,#ff4d6d,#f02849);border-color:#ff6b85;box-shadow:0 4px 14px rgba(240,40,73,0.5),inset 0 1px 0 rgba(255,255,255,0.25)}
.fav-btn.faved .fav-glow{opacity:1}
.fav-btn.faved #fav-icon{animation:favPop .42s cubic-bezier(.34,1.56,.64,1)}
@keyframes favPop{0%{transform:scale(1)}35%{transform:scale(1.35)}60%{transform:scale(.9)}100%{transform:scale(1)}}
@keyframes favBeat{0%,100%{transform:scale(1)}25%{transform:scale(1.15)}50%{transform:scale(1)}}

/* Manage / Action Buttons */
.mng-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:11px 8px;color:#fff;border:none;border-radius:10px;font-size:13px;font-weight:700;text-align:center;text-decoration:none;cursor:pointer;white-space:nowrap;transition:transform .12s,filter .15s}
.mng-btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
.mng-btn:active{transform:translateY(0)}
@media (max-width:480px){
  .mng-btn{font-size:11.5px;padding:9px 4px;gap:4px;min-width:0;border-radius:8px}
  .mng-btn svg{width:12px;height:12px;flex-shrink:0}
  .mng-sub{flex-wrap:nowrap !important;gap:5px !important}
  .mng-sub .mng-btn{flex:1 1 0 !important;min-width:0;font-size:10px;padding:8px 2px;white-space:nowrap}
}

/* Attribute Row Hover & NCC Blink */
.attr-row{transition:background .15s}
.attr-row:hover{background:rgba(255,255,255,0.06)}
@keyframes nccblink{0%,100%{opacity:1}50%{opacity:.35}}

/* Reaction & Comments */
.react-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 4px;background:none;color:var(--text3);border:none;font-size:12px;font-weight:600;cursor:pointer;transition:color .15s}
.react-btn:hover{color:var(--text2)}
.react-btn .rc{font-size:12px;font-weight:700;min-width:6px}
.react-btn.on-like{color:var(--blue)}
.react-btn.on-dislike{color:var(--red)}
.react-btn:active{transform:scale(.88)}
.reply-link{background:none;border:none;color:var(--text3);font-size:12px;font-weight:600;cursor:pointer;padding:2px 4px;transition:color .15s}
.reply-link:hover{color:var(--blue)}
.reply-list{margin:8px 0 0 14px;padding-left:12px;border-left:2px solid var(--border);display:flex;flex-direction:column;gap:10px}
.reply-item{padding-top:2px}
.reply-form{display:flex;gap:6px;margin:8px 0 0 14px}
.reply-input{flex:1;min-width:0;font-size:13px;padding:8px 12px;border-radius:18px;border:1px solid var(--border);background:var(--bg);color:var(--text)}
.reply-send{flex-shrink:0;padding:8px 16px;background:var(--blue);color:#fff;border:none;border-radius:18px;font-size:13px;font-weight:700;cursor:pointer}

/* Share Bottom Sheet Modal */
#share-sheet{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:10004;align-items:flex-end;justify-content:center}
#share-sheet.open{display:flex}
.share-panel{background:var(--bg2);width:100%;max-width:480px;border-radius:16px 16px 0 0;padding:20px 18px 24px;animation:sheetUp .25s ease-out}
@keyframes sheetUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.share-opt{display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;color:var(--text2);font-size:11px;font-weight:600}
.share-ic{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center}

/* Shopee-like Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#lightbox-img {
    max-width: 100%;
    max-height: 80%;
    touch-action: none;
    transition: transform .15s ease-out;
    will-change: transform;
}

/* User Auth & Dropdown Profile Styles */
.guest-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 158, 255, 0.12);
    border: 1px solid rgba(74, 158, 255, 0.35);
    color: #4a9eff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.guest-login-btn:hover {
    background: #4a9eff;
    color: #fff;
    border-color: #4a9eff;
}

.user-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 4px 10px 4px 6px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s;
}
.user-pill-btn:hover {
    border-color: var(--blue);
}

.user-avatar-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.user-name-txt {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-stars-badge {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-dropdown-pop {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 230px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    padding: 12px;
    z-index: 99999;
}
.user-dropdown-pop.open {
    display: block;
    animation: fadeInDown 0.18s ease-out;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.udp-header {
    padding-bottom: 8px;
}
.udp-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}
.udp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.udp-item:hover {
    background: var(--bg3);
    color: #fff;
}
.udp-ico {
    font-size: 15px;
}

/* Auth Modal Styles */
.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.auth-modal-overlay.open {
    display: flex;
}

.auth-modal-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
    animation: scaleUp 0.2s ease-out;
}
@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--nav);
}
.auth-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-close-btn {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}
.auth-close-btn:hover {
    color: #fff;
}

.auth-tabs-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.auth-tab-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text2);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.18s;
}
.auth-tab-btn.active {
    color: #fff;
    border-bottom-color: var(--blue);
    background: var(--bg2);
}

.auth-body {
    padding: 20px;
}
.auth-field {
    margin-bottom: 14px;
}
.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
}
.auth-field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 14px !important;
}
.auth-field input:focus {
    border-color: var(--blue);
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1877f2, #0056b3);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 6px;
}
.auth-submit-btn:hover {
    opacity: 0.92;
}

.auth-alert {
    display: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    font-weight: 600;
}
.auth-alert.error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.auth-alert.success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}


