/* ============================================
   0. FONTS
   ============================================ */
@font-face {
    font-family: "More Sugar";
    src: url("../fonts/MoreSugar.woff2") format("woff2"),
       url("../fonts/MoreSugar.woff") format("woff"),
       url("../fonts/MoreSugar.otf") format("opentype"),
       url("../fonts/MoreSugar.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   1. VARIABLES (custom properties)
   ============================================ */
:root {
    --border-color: #000;
    --page-bg-color: #f0f0f0;
    --box-bg-color: #fff;
    --banner-color: #f2994a;
    --sidebar-width: 200px;
    --stamp-width: 175px;
    --text-font: Arial, Helvetica, sans-serif;
    --banner-font: "More Sugar", "Comic Sans MS", cursive, sans-serif;
}

/* ============================================
   2. BASIC RESET
   ============================================ */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--text-font);
    background-color: var(--page-bg-color);
    color: #222;
}

a {
    color: #000;
    text-decoration: underline;
}

a:hover {
    color: #1a4fd6;
}

/* ============================================
   3. MAIN SITE GRID (3 columns, height = screen)
   ============================================ */
.site-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
    max-width: 1400px;
    height: 100vh;
    margin: 0 auto;
    gap: 12px;
    padding: 12px;
}

.sidebar-left {
    grid-column: 1;
}

.center-col {
    grid-column: 2;
}

.sidebar-right {
    grid-column: 3;
}

.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 12px;
}

/* ============================================
   4. CENTER COLUMN: fixed header + scrollable content
   ============================================ */
.center-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid var(--border-color);
    background-color: var(--box-bg-color);
    padding: 12px;
    overflow: hidden;
}

.site-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 12px;
    flex-wrap: wrap;
}

.main-nav a {
    font-size: 1.1rem;
}

.banner {
    background-color: var(--banner-color);
    padding: 14px;
    text-align: center;
}

.banner h1 {
    margin: 0;
    color: #fff;
    font-family: var(--banner-font);
}

/* min-height: 0 is required here — without it a flex child never
   shrinks below its content size, and overflow-y never kicks in. */
.site-main-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* ============================================
   5. SIDEBARS
   ============================================ */
.sidebar {
    border: 2px solid var(--border-color);
    padding: 10px;
}

.sidebar h2 {
    text-align: center;
    padding: 6px;
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: normal;
    font-family: var(--text-font);
}

/* --- 5b. Stamps (Topics) --- */
.stamp-list {
    padding: 10px;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stamp {
    width: var(--stamp-width);
}

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

/* --- 5c. RSS icon --- */
.rss-icon {
    display: block;
    width: 24px;
    height: 24px;
}

/* --- 5d. 88x31 buttons (Web Buttons) --- */
.button-box {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.button-box img {
    display: block;
    width: 88px;
    height: 31px;
}

.nobutton {
    display: block;
    max-width: 88px;
}

/* ============================================
   6. CENTRAL CONTENT (inside .site-main-scroll)
   ============================================ */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 20px;
}

.span-all {
    grid-column: 1 / -1;
}

.credit {
    margin: 14px 0 0 0;
    font-weight: bold;
    font-family: var(--text-font);
}

/* --- 6b. Featured art + update marker --- */
.featured-art {
    position: relative;
    margin: 0;
}

.featured-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f5f5f5;
}

.update-marker {
    position: absolute;
    left: 20px;
    bottom: 16px;
    width: 90px;
    height: 90px;
}

.update-marker::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: rgba(255, 60, 60, 0.55);
    z-index: 1;
}

.update-marker::after {
    content: "";
    position: absolute;
    left: -18px;
    top: 10px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: rgba(255, 60, 60, 0.4);
    z-index: 1;
}

.update-marker__number {
    position: absolute;
    left: -9px;
    top: 5px;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: "Times New Roman", Times, serif;
    font-size: 2.2rem;
    font-weight: bold;
    z-index: 2;
}

/* --- 6c. Section grid (links, headers, meme) --- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    align-content: start;
}

.content-header {
    margin: 0 0 10px 0;
    font-family: var(--text-font);
    font-size: 1.15rem;
    font-weight: bold;
}

.section-header {
    text-align: center;
    font-family: var(--text-font);
    font-size: 1.4rem;
    font-weight: bold;
    margin: 8px 0;
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.link-list a {
    font-family: var(--text-font);
}

.meme-col {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.meme-img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ============================================
   7. VISIT COUNTER
   ============================================ */
.counter-box {
    font-family: "Courier New", monospace;
    text-align: center;
    margin: 16px 0 0 0;
}

#visit-counter {
    background: #000;
    color: #0f0;
    padding: 2px 6px;
    letter-spacing: 2px;
}

/* ============================================
   8. 404 PAGE
   ============================================ */
.page-404 {
    text-align: center;
    padding: 20px;
}

.page-404__gif {
    max-width: 250px;
    height: auto;
}
