/* =========================================
   SMASH SENPAI GUIDES
   Load AFTER /core.css:
   <link rel="stylesheet" href="/core.css?v=1.6">
   <link rel="stylesheet" href="/guides.css?v=1">
   core.css resets every margin/padding to 0 and expects the game theme
   files to define the --color-* variables, so this file does both jobs
   for guide pages.
========================================= */

:root {
    /* Default site theme (pink accent, same as the homepage) */
    --color-primary: 255, 77, 216;
    --color-secondary: 41, 144, 255;
    --color-tertiary: 153, 50, 204;
    --color-special: 255, 215, 0;

    /* Soft glow instead of a game wallpaper */
    --dynamic-bg:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 77, 216, 0.20), transparent 70%),
        radial-gradient(ellipse 50% 40% at 100% 55%, rgba(41, 144, 255, 0.10), transparent 70%);
    --bg-blend: normal;
    --bg-opacity: 1;

    --guide-text: rgba(255, 255, 255, 0.88);
    --guide-line: rgba(255, 255, 255, 0.08);
}

/* core.css only removes underlines on some links; the logo link needs it too */
.navbar a,
.global-footer a { text-decoration: none; }

/* ---------- Page wrapper ---------- */
.guide-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 16px 60px;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 18px;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: rgb(var(--color-primary)); }
.breadcrumb [aria-current="page"] { color: var(--text-light); }

/* ---------- Article panel ---------- */
.guide-article {
    background: rgba(18, 18, 26, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 3px solid rgb(var(--color-primary));
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: var(--guide-text);
    font-size: 1.05rem;
    line-height: 1.75;
}

.guide-article h1 {
    color: var(--text-light);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 14px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--guide-line);
}

.guide-article h2 {
    color: var(--text-light);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 40px 0 12px;
    padding-left: 12px;
    border-left: 4px solid rgb(var(--color-primary));
}
.guide-article h3 {
    color: var(--text-light);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 26px 0 8px;
}

.guide-article p { margin: 0 0 16px; }
.guide-article ul,
.guide-article ol { margin: 0 0 18px; padding-left: 24px; }
.guide-article li { margin-bottom: 8px; }
.guide-article strong { color: var(--text-light); }

.guide-article a {
    color: rgb(var(--color-secondary));
    text-decoration: underline;
    text-underline-offset: 3px;
}
.guide-article a:hover { color: rgb(var(--color-primary)); }

/* ---------- Page layout: article + sticky contents ---------- */
.guide-wrap-wide { max-width: 1120px; }
.guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 24px;
    align-items: start;
}
.guide-aside { position: sticky; top: 90px; }
.guide-toc {
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(18, 18, 26, 0.78);
    border: 1px solid var(--guide-line);
    font-size: 0.92rem;
    line-height: 1.45;
}
.guide-toc .toc-title { margin: 0 0 10px; color: var(--text-light); font-weight: 700; }
.guide-toc ul { list-style: none; margin: 0; padding: 0; }
.guide-toc li { margin: 0 0 8px; }
.guide-toc li:last-child { margin-bottom: 0; }
.guide-toc a { color: var(--text-dim); text-decoration: none; }
.guide-toc a:hover { color: rgb(var(--color-primary)); }
.guide-article h2 { scroll-margin-top: 90px; }

/* ---------- Figures ---------- */
.guide-article figure { margin: 26px 0; }
.guide-article figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--guide-line);
}
.guide-article figcaption {
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-dim);
    text-align: center;
}
.figure-narrow { max-width: 340px; margin-left: auto; margin-right: auto; }
.figure-medium { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Callout ---------- */
.callout {
    margin: 24px 0;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(var(--color-primary), 0.08);
    border: 1px solid rgba(var(--color-primary), 0.3);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Data tables (for the vote-data posts) ---------- */
.table-scroll { overflow-x: auto; margin: 22px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--guide-line);
}
.data-table th { color: var(--text-light); font-weight: 700; white-space: nowrap; }
.data-table td.num,
.data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Buttons and link chips ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 6px; }
.guide-article a.cta-btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 999px;
    background: rgb(var(--color-primary));
    color: var(--btn-text);
    font-weight: 700;
    text-decoration: none;
}
.guide-article a.cta-btn:hover { background: rgba(var(--color-primary), 0.8); color: var(--btn-text); }
.guide-article a.cta-btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-light);
}
.guide-article a.cta-btn.ghost:hover { border-color: rgb(var(--color-primary)); }

.game-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 14px 0 20px;
}
.game-links li { margin: 0; }
.guide-article .game-links a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--guide-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-light);
    font-size: 0.92rem;
    text-decoration: none;
}
.guide-article .game-links a:hover { border-color: rgb(var(--color-primary)); }

/* ---------- Guides hub ---------- */
.guide-hero { margin: 0 0 28px; }
.guide-hero h1 {
    color: var(--text-light);
    font-size: clamp(1.9rem, 5vw, 2.7rem);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 12px;
}
.guide-hero p {
    max-width: 62ch;
    color: var(--guide-text);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 12px;
}
.guide-hero a { color: rgb(var(--color-secondary)); text-underline-offset: 3px; }
.guide-hero a:hover { color: rgb(var(--color-primary)); }

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.guide-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}
.guide-card:hover,
.guide-card:focus-visible { border-color: rgb(var(--color-primary)); }
.guide-card img {
    display: block;
    width: 100%;
        height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top center;
    border-bottom: 1px solid var(--guide-line);
}
.guide-card-body { padding: 18px; }
.guide-card h2 {
    color: var(--text-light);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 8px;
}
.guide-card p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; margin: 0 0 10px; }
.guide-card .card-date { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Keyboard focus ---------- */
.guide-article a:focus-visible,
.breadcrumb a:focus-visible,
.guide-card:focus-visible {
    outline: 2px solid rgb(var(--color-primary));
    outline-offset: 3px;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .guide-wrap { padding: 20px 10px 40px; }
    .guide-article { padding: 26px 16px; font-size: 1rem; }
    .guide-article h2 { font-size: 1.25rem; margin-top: 32px; }
    .cta-row { flex-direction: column; }
    .guide-article a.cta-btn { text-align: center; }
}

/* Contents list is hidden on tablets and phones; the article takes the full width */
@media (max-width: 960px) {
    .guide-layout { grid-template-columns: minmax(0, 1fr); }
    .guide-aside { display: none; }
}
