@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap');

/* ============ Variables ============ */
:root {
    --wine: #6D1F3C;
    --wine-deep: #521530;
    --wine-ink: #3A0E22;
    --champagne: #E8D5B5;
    --champagne-soft: #F3E8D6;
    --cream: #FBF7F2;
    --paper: #FFFFFF;
    --ink: #2B1220;
    --muted: #8A6B76;
    --line: rgba(109, 31, 60, 0.16);
    --line-strong: rgba(109, 31, 60, 0.42);
    --radius: 12px;
    --radius-pill: 999px;
    --shadow: 0 8px 24px rgba(109, 31, 60, 0.08);
    --shadow-hover: 0 14px 34px rgba(109, 31, 60, 0.18);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    background-image: radial-gradient(rgba(109, 31, 60, 0.045) 1px, transparent 1px);
    background-size: 22px 22px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--wine-deep); }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--wine-ink); line-height: 1.25; margin: 0 0 .5em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; }
.site-content { min-height: 60vh; padding-bottom: 40px; }

/* Grid/flex children shrink safely */
.post-card, .bento-card, .article-item, .header-inner, .nav-menu, .marquee-track > * { min-width: 0; }

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .92rem;
    letter-spacing: .02em;
    border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-wine { background: var(--wine); color: #fff; }
.btn-wine:hover { background: var(--wine-deep); color: #fff; box-shadow: var(--shadow-hover); }
.btn-champagne { background: var(--champagne); color: var(--wine-ink); border-color: rgba(109,31,60,.25); }
.btn-champagne:hover { background: #fff; color: var(--wine); box-shadow: var(--shadow-hover); }
.btn-login { background: transparent; color: var(--wine); border-color: var(--line-strong); }
.btn-login:hover { background: var(--champagne-soft); }
.btn-register { background: var(--wine); color: #fff; }
.btn-register:hover { background: var(--wine-deep); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: .82rem; }
.btn-lg { padding: 14px 34px; font-size: 1.05rem; }

/* ============ Header ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 247, 242, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 12px 0;
}
.site-logo { flex-shrink: 0; }
.logo-img { max-height: 46px; width: auto; }

/* Capsule nav */
.main-nav .nav-menu {
    list-style: none;
    margin: 0;
    padding: 5px;
    display: flex;
    gap: 4px;
    background: var(--champagne-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
}
.main-nav .nav-menu li { min-width: 0; }
.main-nav .nav-menu a {
    display: block;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .92rem;
    color: var(--wine);
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.main-nav .nav-menu a:hover { background: rgba(109, 31, 60, 0.1); }
.main-nav .nav-menu li.current-menu-item > a,
.main-nav .nav-menu li.current_page_item > a,
.main-nav .nav-menu li.current-menu-ancestor > a {
    background: var(--wine);
    color: var(--champagne);
    box-shadow: inset 0 0 0 1px rgba(232, 213, 181, .35);
}
.header-actions { margin-left: auto; display: flex; gap: 10px; flex-shrink: 0; }
.nav-toggle {
    display: none;
    background: var(--champagne-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--wine);
    border-radius: 2px;
    position: relative;
    transition: transform .2s ease;
}
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ''; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

/* ============ Marquees ============ */
.marquee-viewport { overflow: hidden; }
.marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: marquee-scroll 26s linear infinite;
}
.marquee-track-slow { animation-duration: 38s; }
.marquee-viewport:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Announcement bar */
.announce-marquee {
    background: linear-gradient(90deg, var(--wine-deep), var(--wine) 50%, var(--wine-deep));
    border-bottom: 1px solid rgba(232, 213, 181, .3);
    padding: 9px 0;
}
.announce-item { color: var(--champagne); font-size: .88rem; font-weight: 500; padding: 0 18px; white-space: nowrap; }
.announce-sep { color: rgba(232, 213, 181, .55); font-size: .75rem; }

/* Hot game names marquee */
.games-marquee {
    margin: 46px 0;
    background: var(--champagne);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    transform: rotate(-1.2deg) scale(1.02);
}
.game-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--wine);
    padding: 0 20px;
    white-space: nowrap;
}
.gm-sep { color: var(--wine); opacity: .45; }

/* ============ Section heads ============ */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 34px 0 18px;
}
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    margin: 0;
    position: relative;
    padding-left: 18px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .12em;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(var(--wine), var(--champagne));
}
.section-sub { margin: 6px 0 0 18px; color: var(--muted); font-size: .92rem; }
.section-head .b-link { flex-shrink: 0; }

/* ============ Capsule tab bar ============ */
.bento-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow);
    width: max-content;
    max-width: 100%;
    margin: 0 0 24px;
}
.bento-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    color: var(--wine);
    padding: 9px 24px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background .22s ease, color .22s ease, transform .22s ease;
}
.bento-tab:hover { background: var(--champagne-soft); }
.bento-tab.is-active {
    background: var(--wine);
    color: var(--champagne);
    box-shadow: 0 6px 16px rgba(109, 31, 60, .3);
}

/* ============ Bento grid ============ */
.bento-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "hero hero cardA cardB"
        "hero hero cardC cardD"
        "cardE cardF cardG cardH"
        "wide wide wide wide";
}
.b-hero { grid-area: hero; }
.b-a { grid-area: cardA; }
.b-b { grid-area: cardB; }
.b-c { grid-area: cardC; }
.b-d { grid-area: cardD; }
.b-e { grid-area: cardE; }
.b-f { grid-area: cardF; }
.b-g { grid-area: cardG; }
.b-h { grid-area: cardH; }
.b-wide { grid-area: wide; }

/* When a filter is active, fall back to auto-flow so hidden areas don't leave gaps */
.bento-grid.is-filtered { grid-template-areas: none; grid-auto-flow: dense; }
.bento-grid.is-filtered .bento-card { grid-area: auto; }

.bento-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-hover);
}
.bento-card.is-hidden { display: none; }
.bento-card.pop-in { animation: card-pop .4s ease both; }
@keyframes card-pop {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.b-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.b-hero .b-img { aspect-ratio: auto; position: absolute; inset: 0; height: 100%; }
.b-hero { position: relative; justify-content: flex-end; min-height: 340px; }
.b-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(43, 18, 32, 0) 30%, rgba(43, 18, 32, .82) 100%);
}
.b-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.b-hero .b-body { position: relative; z-index: 2; }
.b-hero .b-title, .b-hero .b-desc { color: #fff; }
.b-title { font-size: 1.05rem; margin: 0; }
.b-title-lg { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.b-desc { margin: 0; font-size: .88rem; color: var(--muted); }
.b-hero .b-desc { color: rgba(255, 255, 255, .85); }
.b-rating { color: #D9A441; font-size: .85rem; font-weight: 600; }
.b-link { font-weight: 600; font-size: .88rem; }
.b-link:hover { letter-spacing: .02em; }
.b-tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--champagne-soft);
    color: var(--wine);
    border: 1px solid var(--line);
}
.b-tag-hot { background: var(--wine); color: var(--champagne); border-color: transparent; }
.b-tag-gold { background: var(--champagne); color: var(--wine-ink); border-color: rgba(109, 31, 60, .25); }

/* Promo cards: champagne gradient */
.b-promo {
    background: linear-gradient(150deg, var(--champagne-soft) 0%, var(--champagne) 100%);
}
.b-promo .b-desc { color: rgba(58, 14, 34, .7); }

/* Wide news card */
.b-wide { flex-direction: row; align-items: stretch; }
.b-wide .b-img { width: 300px; aspect-ratio: auto; height: auto; flex-shrink: 0; }
.b-wide .b-body { justify-content: center; }

/* ============ Article list (front page) ============ */
.article-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.article-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.article-item:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.article-link { display: block; color: inherit; }
.article-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.article-content { padding: 16px; }
.article-title { font-size: 1rem; margin: 0 0 8px; }
.article-excerpt { margin: 0 0 10px; font-size: .86rem; color: var(--muted); }
.article-date { font-size: .78rem; color: var(--muted); }
.no-posts { color: var(--muted); padding: 30px 0; }

/* ============ CTA band ============ */
.cta-band {
    margin: 44px 0 20px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 15% 20%, rgba(232, 213, 181, .25), transparent 40%),
        linear-gradient(120deg, var(--wine-deep), var(--wine));
    border: 1px solid rgba(232, 213, 181, .35);
    padding: 46px 30px;
    text-align: center;
}
.cta-title { color: var(--champagne); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 8px; }
.cta-desc { color: rgba(232, 213, 181, .8); margin: 0 0 22px; }

/* ============ Post grid (index/archive) ============ */
.listing-section { padding: 30px 0; }
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.post-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.post-card-link { display: block; color: inherit; }
.post-card-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card-body { padding: 16px; }
.post-card-title { font-size: 1.02rem; margin: 0 0 8px; }
.post-card-excerpt { margin: 0 0 10px; font-size: .86rem; color: var(--muted); }
.post-card-date { font-size: .78rem; color: var(--muted); }

/* Pagination */
.pagination, .nav-links { display: flex; justify-content: center; gap: 8px; padding: 30px 0 10px; }
.pagination a, .pagination span, .nav-links a, .nav-links span {
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--paper);
    color: var(--wine);
    font-weight: 600;
    font-size: .9rem;
}
.pagination .current, .nav-links .current { background: var(--wine); color: var(--champagne); border-color: var(--wine); }
.pagination a:hover { background: var(--champagne-soft); }

/* ============ Single / page ============ */
.single-article, .page-article {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    margin: 30px 0;
}
.single-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 12px; }
.single-meta { display: flex; gap: 18px; color: var(--muted); font-size: .86rem; margin-bottom: 20px; }
.single-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.entry-content { font-size: 1.02rem; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.single-cta { text-align: center; margin: 30px 0; }
.single-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 26px;
    font-size: .9rem;
}
.single-nav-item { min-width: 0; max-width: 48%; overflow: hidden; text-overflow: ellipsis; }

/* ============ Footer ============ */
.site-footer {
    background: var(--wine-ink);
    border-top: 3px solid var(--champagne);
    padding: 46px 0 30px;
    color: rgba(232, 213, 181, .75);
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(232, 213, 181, .18);
}
.footer-widget { min-width: 0; }
.footer-widget .widget-title { color: var(--champagne); font-size: 1.05rem; }
.footer-widget a { color: rgba(232, 213, 181, .75); }
.footer-widget a:hover { color: #fff; }
.footer-widget ul { list-style: none; margin: 0; padding: 0; }
.footer-widget li { margin-bottom: 8px; }
.footer-bottom { padding-top: 26px; text-align: center; }
.disclaimer-text { font-size: .82rem; line-height: 1.7; color: rgba(232, 213, 181, .65); max-width: 720px; margin: 16px auto 0; }

/* ============ Reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
