/* ============================================================
   Moban 8-10-35 - App Shell | main.css
   Indigo #5C6BC0 x Peach #FFAB91 | Radius 22px | Glass Dock
   ============================================================ */

html, body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

:root {
    --primary: #5C6BC0;
    --primary-deep: #3F4FA8;
    --primary-soft: #E8EBFA;
    --peach: #FFAB91;
    --peach-deep: #FF8A65;
    --bg: #F4F5FB;
    --ink: #23263B;
    --ink-soft: #6A6F8C;
    --card: #FFFFFF;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow-card: 0 10px 30px rgba(92, 107, 192, 0.12);
    --shadow-float: 0 18px 40px rgba(63, 79, 168, 0.22);
    --font: 'Be Vietnam Pro', 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    padding-bottom: 90px;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    top: -180px;
    right: -140px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(92, 107, 192, 0.16), transparent 68%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    bottom: 60px;
    left: -160px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255, 171, 145, 0.18), transparent 66%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: var(--peach-deep);
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* ---------- Topbar ---------- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 245, 251, 0.82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(92, 107, 192, 0.12);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.topbar-logo .logo-img {
    max-height: 42px;
    width: auto;
    display: block;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.chip-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.chip-login {
    color: var(--primary);
    background: var(--primary-soft);
}

.chip-register {
    color: #fff;
    background: linear-gradient(135deg, var(--peach), var(--peach-deep));
    box-shadow: 0 6px 16px rgba(255, 138, 101, 0.35);
}

.chip-btn:hover {
    transform: translateY(-2px);
    color: var(--ink);
}

.chip-register:hover {
    color: #fff;
}

/* ---------- App shell / main ---------- */
.app-shell {
    position: relative;
    z-index: 1;
}

.app-main {
    padding: 18px 0 40px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    font-family: var(--font);
    font-weight: 700;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.3;
    border: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 8px 18px rgba(92, 107, 192, 0.35);
}

.btn-peach {
    color: #fff;
    background: linear-gradient(135deg, var(--peach), var(--peach-deep));
    box-shadow: 0 10px 22px rgba(255, 138, 101, 0.4);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-view-all {
    color: var(--primary);
    background: var(--primary-soft);
    margin-top: 18px;
}

.btn-sm { padding: 7px 16px; font-size: 12.5px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-xl { padding: 16px 34px; font-size: 17px; }

/* ---------- Hero card ---------- */
.hero-card {
    position: relative;
    display: grid;
    grid-template-areas: "content visual";
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 34px 30px;
    margin-bottom: 22px;
    color: #fff;
    background: linear-gradient(130deg, var(--primary-deep) 0%, var(--primary) 55%, #7986CB 100%);
    box-shadow: var(--shadow-float);
}

.hero-glow {
    position: absolute;
    top: -90px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 171, 145, 0.5), transparent 70%);
    pointer-events: none;
}

.hero-content { grid-area: content; position: relative; }
.hero-visual { grid-area: visual; position: relative; }

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 14px;
}

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(26px, 4.4vw, 42px);
    font-weight: 900;
    line-height: 1.15;
}

.hero-title span {
    color: var(--peach);
}

.hero-desc {
    margin: 0 0 20px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 420px;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.hero-stats {
    display: flex;
    gap: 26px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.hero-stat strong {
    font-size: 20px;
    font-weight: 900;
    color: var(--peach);
}

.hero-stat span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

.hero-img {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    transform: rotate(2.5deg);
}

/* ---------- Tabs ---------- */
.app-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    margin-bottom: 20px;
    background: var(--card);
    border-radius: 999px;
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    scrollbar-width: none;
}

.app-tabs::-webkit-scrollbar { display: none; }

.app-tab {
    flex: 1;
    min-width: max-content;
    padding: 11px 18px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-soft);
    cursor: pointer;
    white-space: nowrap;
    transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

.app-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 8px 18px rgba(92, 107, 192, 0.38);
}

.tab-pane {
    animation: pane-in .35s ease both;
}

.tab-pane[hidden] { display: none; }

@keyframes pane-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Section titles ---------- */
.section-title {
    position: relative;
    margin: 30px 0 16px;
    padding-left: 14px;
    font-size: 20px;
    font-weight: 900;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--primary), var(--peach));
}

/* ---------- Card grid ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.card-item {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease;
}

.card-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-float);
}

.card-img,
.card-item .card-img img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 12px 14px 16px;
}

.card-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-rating {
    font-size: 12.5px;
    color: var(--peach-deep);
    font-weight: 700;
    margin-bottom: 10px;
}

.card-excerpt {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--ink-soft);
}

.card-date {
    font-size: 12px;
    color: var(--ink-soft);
}

.card-link {
    display: block;
    color: inherit;
}

/* ---------- Game horizontal rail ---------- */
.game-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 2px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-soft) transparent;
    -webkit-overflow-scrolling: touch;
}

.game-rail::-webkit-scrollbar { height: 5px; }
.game-rail::-webkit-scrollbar-thumb {
    background: var(--primary-soft);
    border-radius: 3px;
}

.rail-card {
    position: relative;
    flex: 0 0 132px;
    scroll-snap-align: start;
    background: var(--card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.rail-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-float);
}

.rail-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.rail-name {
    display: block;
    padding: 8px 8px 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rail-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #fff;
    background: linear-gradient(135deg, var(--peach), var(--peach-deep));
    box-shadow: 0 4px 10px rgba(255, 138, 101, 0.45);
}

/* ---------- Article list ---------- */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-list-item {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease;
}

.article-list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.article-list-link {
    display: flex;
    gap: 14px;
    align-items: center;
    color: inherit;
}

.article-list-thumb {
    flex: 0 0 110px;
    height: 90px;
    overflow: hidden;
}

.article-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-list-content {
    padding: 12px 14px 12px 0;
    min-width: 0;
}

.article-list-title {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-list-excerpt {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-list-date {
    font-size: 12px;
    color: var(--ink-soft);
}

.empty-note {
    padding: 22px;
    text-align: center;
    color: var(--ink-soft);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

/* ---------- Download card ---------- */
.download-card {
    position: relative;
    display: grid;
    grid-template-areas: "body visual";
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 22px;
    overflow: hidden;
    margin-top: 30px;
    padding: 32px 28px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(120deg, var(--peach-deep) 0%, var(--peach) 34%, var(--primary) 100%);
    box-shadow: var(--shadow-float);
}

.download-orbit {
    position: absolute;
    bottom: -120px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.download-body { grid-area: body; position: relative; }
.download-visual { grid-area: visual; position: relative; }

.download-title {
    margin: 0 0 10px;
    font-size: clamp(22px, 3.6vw, 32px);
    font-weight: 900;
}

.download-desc {
    margin: 0 0 20px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.92);
}

.download-img {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
    transform: rotate(-2deg);
}

/* ---------- Page head ---------- */
.page-head {
    margin-bottom: 22px;
    padding: 26px 24px;
    border-radius: var(--radius);
    background: linear-gradient(130deg, var(--primary-deep), var(--primary));
    color: #fff;
    box-shadow: var(--shadow-float);
}

.page-title {
    margin: 0 0 6px;
    font-size: clamp(22px, 3.6vw, 32px);
    font-weight: 900;
}

.page-sub {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Post / single ---------- */
.post-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow-card);
    margin-bottom: 18px;
}

.post-title {
    margin: 0 0 12px;
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 900;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.post-thumb {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.post-content {
    font-size: 15.5px;
    color: #3A3E58;
}

.post-content p { margin: 0 0 16px; }

.post-content h2,
.post-content h3 {
    font-weight: 800;
    margin: 26px 0 12px;
}

.post-content img {
    border-radius: var(--radius-sm);
}

.post-content a { text-decoration: underline; }

.post-cta {
    text-align: center;
    padding: 22px 0 6px;
    border-top: 1px dashed rgba(92, 107, 192, 0.25);
    margin-top: 24px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
}

.post-nav-item {
    flex: 1;
    min-width: 0;
}

.post-nav-item a {
    display: block;
    padding: 12px 16px;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-card { margin-bottom: 26px; }

/* ---------- Pagination ---------- */
.pagination-bar {
    margin-top: 24px;
    text-align: center;
}

.pagination-bar .nav-links {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-bar .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow-card);
    font-weight: 700;
    font-size: 14px;
}

.pagination-bar .page-numbers.current {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}

/* ---------- Footer ---------- */
.app-footer {
    padding: 30px 0 40px;
    position: relative;
    z-index: 1;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-bottom: 26px;
}

.footer-widget {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    font-size: 14px;
}

.widget-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 900;
    color: var(--primary-deep);
}

.footer-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-widget li {
    padding: 5px 0;
    border-bottom: 1px dashed rgba(92, 107, 192, 0.15);
}

.footer-bottom {
    text-align: center;
}

.disclaimer-text {
    max-width: 640px;
    margin: 14px auto 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ---------- Floating Dock ---------- */
.float-dock {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    width: 520px;
    z-index: 100;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 44px rgba(63, 79, 168, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dock-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 4px 6px;
    border-radius: 999px;
    color: var(--ink-soft);
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.dock-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform .25s ease;
}

.dock-label {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dock-item:hover {
    color: var(--primary-deep);
}

.dock-item:hover .dock-icon {
    transform: translateY(-3px) scale(1.12);
}

.dock-item.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 8px 18px rgba(92, 107, 192, 0.4);
}

.dock-item-cta.is-active {
    background: linear-gradient(135deg, var(--peach), var(--peach-deep));
    box-shadow: 0 8px 18px rgba(255, 138, 101, 0.45);
}

/* ---------- Scroll reveal ---------- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
