@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --ink: #1b1f2a;
    --muted: #6b7280;
    --primary: #1b5fe0;
    --accent: #ff7b3a;
    --radius: 20px;
    --shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top, #eef2ff 0%, #f6f7fb 45%, #ffffff 100%);
    color: var(--ink);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.topbar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.topbar h1 {
    font-size: 18px;
    font-weight: 700;
}

.topbar-center img {
    height: 26px;
    object-fit: contain;
}

.topic-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.topic-scroll::-webkit-scrollbar {
    display: none;
}

.topic-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    box-shadow: var(--shadow);
}

.topic-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 40;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: var(--surface);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 18px 16px 30px;
    box-shadow: 0 -20px 40px rgba(15, 23, 42, 0.2);
    transition: bottom 0.25s ease;
    z-index: 50;
}

.menu-sheet.active {
    bottom: 0;
}

.menu-handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    margin: 0 auto 12px;
}

.menu-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

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

.menu-item {
    background: #f9fafb;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    border: 1px solid rgba(15, 23, 42, 0.06);
    text-align: center;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.hero {
    margin-bottom: 18px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.section-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(27, 95, 224, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
}

.slider {
    position: relative;
}

.slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    padding-right: 20px;
    scroll-behavior: smooth;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slide {
    min-width: 78%;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    scroll-snap-align: start;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.55) 100%);
    pointer-events: none;
}

.slide img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.slide .slide-label {
    position: absolute;
    left: 16px;
    bottom: 16px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.slider-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d1d5db;
    transition: all 0.2s ease;
}

.slider-dots span.active {
    width: 18px;
    background: var(--primary);
}

.categories {
    margin-top: 22px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    background: var(--surface);
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.category-card .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.category-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.category-card span {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: block;
    padding: 8px 10px 10px;
}

.post-list {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-card img {
    height: 190px;
    width: 100%;
    object-fit: cover;
}

.post-body {
    padding: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(27, 95, 224, 0.12);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 10px;
}

.post-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 12px 0 8px;
}

.post-body p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
}

.read-more {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(27, 95, 224, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
}

.post-page .hero-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.post-page .content {
    background: var(--surface);
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-page .content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.post-page .content .meta {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.post-page .content .body {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--primary);
}

.footer-note {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 24px;
}

.empty {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 30px 0;
}
