
:root {
    --primary: #0066ff;
    --primary-hover: #0052cc;
    --primary-bg: rgba(0, 102, 255, 0.08);
    --dark: #121212;
    --dark-surface: #1e1e1e;
    --text-color: #212121;
    --text-muted: #757575;
    --border-color: #eaeaea;
    --bg-gray: #f8f9fa;
    --star-gold: #ffb800;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background: #ffffff;
    line-height: 1.5;
    font-size: 15px;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 8px 0;
}
.header-nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    border-radius: 28px;
    padding: 0 16px;
    position: relative;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.header-left::-webkit-scrollbar { display: none; }
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-left: 8px;
    background: inherit;
}
.menu-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px;
    color: #424242;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}
.menu-item:hover, .menu-item__active {
    background: #f0f3f6;
    color: #000;
}
.menu-item svg { width: 20px; height: 20px; fill: currentColor; }
.btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #424242;
}
.btn-icon:hover { background: #f0f0f0; color: #000; }
.btn-icon svg { width: 22px; height: 22px; fill: currentColor; }
.desktop-nav { display: flex; align-items: center; gap: 4px; }
.mobile-nav-toggle { display: none; }

.mobile-drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.mobile-drawer {
    position: fixed;
    top: 0; left: -280px; bottom: 0;
    width: 280px;
    background: #fff;
    z-index: 2001;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.mobile-drawer-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
}
.mobile-drawer-title { font-size: 16px; font-weight: 800; color: #111; }
.mobile-drawer-menu { padding: 12px 8px; overflow-y: auto; flex: 1; }
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    border-radius: 10px;
    margin-bottom: 4px;
}
.mobile-menu-item:hover, .mobile-menu-item.active { background: #f0f4f9; color: var(--primary); }
.mobile-menu-item svg { width: 22px; height: 22px; fill: currentColor; }
body.drawer-open .mobile-drawer-overlay { opacity: 1; visibility: visible; }
body.drawer-open .mobile-drawer { left: 0; }

.search-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
}
.search-modal.active { display: flex; }
.search-dialog {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.search-input-wrap {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 6px 10px;
}
.search-input-wrap svg { width: 22px; height: 22px; fill: #888; }

.top-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    margin-bottom: 12px;
}
.top-nav__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}
.top-nav__title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    max-width: 65%;
}
.top-nav-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}
.top-nav-btn:hover { background: #f0f0f0; }
.top-nav-btn svg { width: 22px; height: 22px; fill: #222; }

.hero-box { padding: 24px 0 16px; }
.hero-box h1 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    color: #111;
}
.hero-box p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 860px;
}

.featured-slider-box {
    border-radius: 18px;
    padding: 20px 16px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1b2838 0%, #0d151e 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.featured-slider-box h2 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #fff;
}
.invisible-horizontal-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.invisible-horizontal-scroll::-webkit-scrollbar { display: none; }
.feat-app-card {
    flex: 0 0 88px;
    text-align: center;
}
.feat-app-card .app-icon img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin: 0 auto;
    object-fit: cover;
}
.feat-app-card .app-name h3 {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    color: #fff;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 14px;
}
.section-head h2 { font-size: 18px; font-weight: 800; color: #111; }
.section-head p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.flex-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.app-card-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: #fff;
    transition: all 0.2s ease;
}
.app-card-row:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.app-card-row .app-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    margin-right: 12px;
}
.app-card-row .app-icon img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
}
.app-card-row .app-meta { flex: 1; min-width: 0; }
.app-card-row .app-title {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}
.app-card-row .app-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}
.app-sub-action-button {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 16px;
    margin-left: 8px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.app-card-row:hover .app-sub-action-button {
    background: var(--primary);
    color: #fff;
}

.top-rank-card {
    position: relative;
    padding: 14px;
    background: #fbfbfb;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    flex: 0 0 130px;
}
.top-rank-card .badge-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #ff822d;
    display: flex;
    align-items: center;
    gap: 2px;
}
.top-rank-card .badge-rank svg { width: 14px; height: 14px; fill: currentColor; }
.top-rank-card img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin: 12px auto 8px;
    object-fit: cover;
}
.top-rank-card h3 { font-size: 12px; font-weight: 700; color: #212121; }

.detail-top-banner {
    position: relative;
    padding: 20px 0 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.app__large {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.app__large .app-icon img {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.app__large .app-name h1 {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
}
.app__large .app-publisher {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 3px;
}

.app-badges {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 14px 0;
}
.app-badge-item { display: flex; flex-direction: column; }
.app-badge-val {
    font-size: 16px;
    font-weight: 800;
    color: #111;
    display: flex;
    align-items: center;
    gap: 3px;
}
.app-badge-val svg { fill: var(--star-gold); width: 15px; height: 15px; }
.app-badge-lbl { font-size: 11px; color: var(--text-muted); }
.app-badge-split { width: 1px; height: 24px; background: #eaeaea; }

.btn-download-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 24px;
    box-shadow: 0 4px 14px rgba(0,102,255,0.25);
    transition: all 0.2s;
    width: auto;
}
.btn-download-hero:hover { background: var(--primary-hover); }
.btn-download-hero svg { width: 18px; height: 18px; fill: currentColor; }

.screenshots-wrapper { margin: 24px 0; }
.screenshots-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.screenshots-scroller {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.screenshots-scroller::-webkit-scrollbar { display: none; }
.screenshot-cell {
    flex: 0 0 200px;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}
.screenshot-cell img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}
.screenshot-info {
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}
.screenshot-tag {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #111;
    padding: 2px 5px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 3px;
}
.screenshot-desc { font-size: 11px; font-weight: 600; color: #212121; }

.app-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.app-info-table tr { border-bottom: 1px solid var(--border-color); }
.app-info-table tr:last-child { border-bottom: none; }
.app-info-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    background: #fbfbfb;
    width: 40%;
}
.app-info-table td {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    text-align: right;
}

.main-article {
    line-height: 1.75;
    color: #333;
    font-size: 14px;
    margin-bottom: 24px;
}
.main-article p { margin-bottom: 12px; }
.main-article h2, .main-article h3 {
    margin: 18px 0 8px;
    font-weight: 800;
    color: #111;
}

.review-list-box {
    margin: 24px 0;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}
.review-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.review-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}
.review-body { flex: 1; }
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.review-name { font-weight: 700; font-size: 13px; color: #111; }
.review-device { font-size: 10px; background: #eee; padding: 1px 5px; border-radius: 3px; color: #666; }
.review-stars { color: var(--star-gold); font-size: 11px; margin-bottom: 3px; }
.review-text { font-size: 12.5px; color: #444; line-height: 1.55; }
.review-meta-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 28px 0;
    flex-wrap: wrap;
}
.archive-pagination a, .archive-pagination span {
    padding: 7px 13px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 700;
    color: #444;
}
.archive-pagination .active a, .archive-pagination .active span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 0 40px;
    background: #fafafa;
    margin-top: 40px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { font-size: 12px; color: #666; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    font-size: 11px;
    color: #999;
    text-align: center;
}

@media (max-width: 992px) {
    .flex-container { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-nav-toggle { display: inline-flex; }
    .header-nav-wrap { height: 50px; }
    .hero-box h1 { font-size: 22px; }
    .flex-container { grid-template-columns: 1fr; }
    .screenshot-cell { flex: 0 0 160px; }
    .screenshot-cell img { height: 280px; }
    .app__large { flex-direction: column; align-items: flex-start; gap: 12px; }
    .btn-download-hero { width: 100%; }
    .footer-cols { grid-template-columns: 1fr; gap: 16px; }
}
