/* ==========================================================================
   ALLNIGHT.CITY - Crimson Checkerboard Retro Gaming Theme
   ========================================================================== */

:root {
    --bg-checker-1: #8d1616;
    --bg-checker-2: #700000;
    --bg-panel: rgba(16, 8, 12, 0.94);
    --bg-panel-solid: #160a10;
    --bg-card: rgba(22, 11, 16, 0.96);
    --bg-card-hover: rgba(34, 16, 24, 0.98);
    --color-gold: #ffc837;
    --color-crimson: #e63946;
    --color-cream: #fff9eb;
    --color-text: #ececf2;
    --color-muted: #aba3ad;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-gold: rgba(255, 200, 55, 0.45);
    --border-crimson: rgba(230, 57, 70, 0.5);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    --max-width: 1360px;
    --max-content-width: 820px;
}

/* Base Reset & Background */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: conic-gradient(var(--bg-checker-1) 90deg, var(--bg-checker-2) 90deg 180deg, var(--bg-checker-1) 180deg 270deg, var(--bg-checker-2) 270deg);
    background-size: 64px 64px;
    background-attachment: fixed;
    background-color: var(--bg-checker-2);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--color-cream);
    text-shadow: 0 0 8px rgba(255, 200, 55, 0.5);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Site Layout */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex-grow: 1;
    padding: 30px 20px 70px;
}

/* ==========================================================================
   News Ticker
   ========================================================================== */

.news-ticker {
    background: #0d060a;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    height: 38px;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1002;
    font-family: var(--font-mono);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ticker-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-crimson);
    color: var(--color-gold);
    padding: 0 16px;
    height: 100%;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 5;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.7);
    border-right: 1px solid var(--border-gold);
}

.ticker-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 8px #00ff66;
    animation: tickerPulse 1.8s infinite ease-in-out;
}

@keyframes tickerPulse {
    0% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0.7; }
}

.ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    mask-image: linear-gradient(to right, transparent, black 15px, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black 95%, transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: tickerScroll 40s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-items {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 20px;
    color: var(--color-cream);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticker-symbol {
    color: var(--color-gold);
    font-size: 0.7rem;
    transition: color 0.2s ease;
}

.ticker-item:hover {
    color: #ffffff;
}

.ticker-item:hover .ticker-headline {
    text-decoration: underline;
}

/* Hot / Community Favorite Ticker Item (Borderless, Shiny & Green Glowing Text) */
.ticker-item.is-hot {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 20px;
    margin: 0;
}

.ticker-item.is-hot .ticker-symbol {
    color: #9aff00;
    text-shadow: 0 0 8px #78d800;
}

.ticker-item.is-hot .ticker-headline {
    font-weight: 700;
    background: linear-gradient(
        90deg,
        #8be000 0%,
        #9aff00 30%,
        #ffffff 50%,
        #9aff00 70%,
        #8be000 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: tickerTextShine 3s infinite linear, tickerTextGlow 2.4s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 8px rgba(120, 216, 0, 0.65));
    display: inline-block;
}

.ticker-item.is-hot:hover .ticker-headline {
    filter: drop-shadow(0 0 16px rgba(154, 255, 0, 1));
}

.ticker-hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(14, 24, 10, 0.85);
    border: 1px solid rgba(120, 216, 0, 0.6);
    border-radius: 999px;
    padding: 1px 7px 1px 5px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #9aff00;
    box-shadow: 0 0 8px rgba(120, 216, 0, 0.35);
    line-height: 1;
    margin-right: 4px;
}

.ticker-hot-badge .ticker-fire-icon {
    font-size: 0.78rem;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 0 4px rgba(255, 140, 0, 0.8));
    animation: fireFlicker 1.8s infinite alternate ease-in-out;
}

.ticker-hot-badge .ticker-yeah-pill {
    color: #9aff00;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
}

@keyframes fireFlicker {
    0% { transform: scale(0.95) rotate(-2deg); }
    50% { transform: scale(1.12) rotate(3deg); }
    100% { transform: scale(1) rotate(-1deg); }
}

@keyframes tickerTextShine {
    0% {
        background-position: 250% 0;
    }
    100% {
        background-position: -250% 0;
    }
}

@keyframes tickerTextGlow {
    0% {
        filter: drop-shadow(0 0 6px rgba(120, 216, 0, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 14px rgba(154, 255, 0, 0.95)) drop-shadow(0 0 24px rgba(120, 216, 0, 0.4));
    }
}

@media (max-width: 600px) {
    .ticker-badge .ticker-title {
        display: none;
    }
    .ticker-badge {
        padding: 0 10px;
    }
}

/* Header & Nav */
.site-header {
    position: sticky;
    top: 38px;
    z-index: 1001;
    background: rgba(12, 6, 9, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--border-gold);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    padding: 12px 24px;
}

.header-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-text {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--color-cream);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-text::before {
    content: "■ ";
    color: var(--color-crimson);
}

.nav {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover, .nav-current .nav-link {
    color: var(--color-gold);
    border-color: var(--border-gold);
    background: rgba(255, 200, 55, 0.08);
}

/* Home Container & Hero */
.home-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-section {
    margin-bottom: 50px;
}

.hero-panel {
    background: var(--bg-panel);
    border: 2px solid var(--border-gold);
    border-radius: 14px;
    padding: 45px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-gold);
    background: rgba(255, 200, 55, 0.12);
    border: 1px solid var(--border-gold);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    color: var(--color-cream);
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #000, 4px 4px 0px var(--color-crimson);
}

.hero-tagline {
    font-size: 1.18rem;
    color: var(--color-text);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Hub Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
    text-align: left;
}

.hub-card {
    background: rgba(30, 14, 22, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-gold);
    background: rgba(45, 20, 32, 0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.hub-icon {
    font-size: 2rem;
    line-height: 1;
}

.hub-title {
    color: var(--color-cream);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.hub-desc {
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

/* Posts Feed */
.feed-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    background: var(--bg-panel);
    padding: 14px 22px;
    border-radius: 8px;
    border-left: 4px solid var(--color-crimson);
    border-top: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.section-title {
    font-family: var(--font-mono);
    color: var(--color-cream);
    font-size: 1.25rem;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.section-title span {
    color: var(--color-crimson);
}

.section-line {
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Content Layout (Main Feed + Sidebar) */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
    margin-top: 30px;
}

.main-column {
    margin-top: 0;
    min-width: 0;
}

.content-layout .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Sidebar Column */
.sidebar-column {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.sidebar-header {
    margin-bottom: 0;
    border-left-color: var(--color-gold);
}

.sidebar-header .section-title {
    font-size: 1.1rem;
}

.sidebar-header .section-title span {
    color: var(--color-gold);
}

.sidebar-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Compact Side Card */
.side-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(22, 11, 18, 0.85);
    border: 1px solid rgba(255, 200, 55, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.side-card:hover {
    transform: translateX(4px);
    border-color: var(--color-gold);
    background: rgba(35, 16, 26, 0.95);
    box-shadow: 0 4px 18px rgba(255, 200, 55, 0.25);
}

.side-card-media {
    flex-shrink: 0;
    width: 78px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.side-card:hover .side-card-thumb {
    transform: scale(1.08);
}

.side-card-body {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.5px;
}

.side-tag {
    background: rgba(255, 200, 55, 0.15);
    color: var(--color-gold);
    border: 1px solid rgba(255, 200, 55, 0.35);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.62rem;
}

.side-date {
    color: var(--color-muted);
}

.side-card-title {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--color-cream);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.side-card:hover .side-card-title {
    color: var(--color-gold);
}

.sidebar-empty {
    padding: 20px;
    background: rgba(20, 10, 15, 0.6);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--color-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Post Cards */
.post-card {
    position: relative;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card-ambient {
    position: absolute;
    inset: -6px;
    background-size: cover;
    background-position: center top;
    filter: blur(28px) saturate(190%);
    opacity: 0.35;
    border-radius: 16px;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-gold);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 200, 55, 0.3);
}

.post-card:hover .post-card-ambient {
    opacity: 0.8;
    filter: blur(34px) saturate(230%);
    transform: scale(1.03);
}

.post-card-image-link {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    background: #000;
    border-radius: 10px 10px 0 0;
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.03);
}

.post-card-content {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border-radius: 0 0 10px 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-bottom: 10px;
}

.meta-dot {
    margin: 0 6px;
    color: var(--color-crimson);
}

.post-card-tag {
    color: var(--color-gold);
    font-weight: 600;
}

.post-card-title {
    font-size: 1.15rem;
    line-height: 1.35;
    margin-bottom: 10px;
    font-weight: 700;
}

.post-card-title a {
    color: #ffffff;
}

.post-card-title a:hover {
    color: var(--color-gold);
}

.post-card-excerpt {
    color: var(--color-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 22px;
    flex-grow: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.read-more-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-gold);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.read-more-link:hover {
    color: #ffffff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.pagination-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-gold);
    background: var(--bg-panel);
    border-radius: 8px;
    color: var(--color-cream);
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--color-gold);
    color: #000;
}

.page-number {
    color: var(--color-cream);
    font-weight: 600;
    background: var(--bg-panel);
    padding: 8px 16px;
    border-radius: 8px;
}

/* Single Post & Page View */
.article-container, .page-container {
    max-width: var(--max-content-width);
    margin: 30px auto;
    background: var(--bg-panel);
    border: 2px solid var(--border-gold);
    border-radius: 14px;
    padding: 45px 50px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.8);
}

.article-header, .page-header {
    margin-bottom: 35px;
    text-align: center;
}

.article-meta {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.article-title, .page-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--color-cream);
    line-height: 1.25;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #000;
}

.article-excerpt, .page-excerpt {
    font-size: 1.15rem;
    color: var(--color-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.article-feature-image-wrap {
    position: relative;
    margin: 35px 0;
    overflow: visible;
}

.article-feature-ambient {
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    filter: blur(40px) saturate(190%);
    opacity: 0.45;
    border-radius: 18px;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.article-feature-image, .page-feature-image {
    position: relative;
    z-index: 1;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-gold);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8);
}

.article-feature-image img, .page-feature-image img {
    border-radius: 0;
    display: block;
    width: 100%;
}

/* Ghost Content (gh-content) Styling */
.gh-content {
    font-size: 1.12rem;
    line-height: 1.85;
    color: #e4e4ed;
}

.gh-content p {
    margin-bottom: 24px;
}

.gh-content h1, .gh-content h2, .gh-content h3, .gh-content h4 {
    color: var(--color-cream);
    margin-top: 40px;
    margin-bottom: 18px;
    font-weight: 700;
}

.gh-content h2 {
    border-bottom: 2px solid var(--color-crimson);
    padding-bottom: 8px;
}

.gh-content ul, .gh-content ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

.gh-content li {
    margin-bottom: 10px;
}

.gh-content blockquote {
    border-left: 4px solid var(--color-gold);
    padding: 16px 24px;
    margin: 30px 0;
    background: rgba(255, 200, 55, 0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--color-cream);
}

/* ==========================================================================
   Terminal-Style Code Blocks & 1-Click Copy
   ========================================================================== */

.terminal-block {
    background: #090306;
    border: 1px solid rgba(255, 200, 55, 0.35);
    border-radius: 10px;
    margin: 32px 0;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 51, 102, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.terminal-block:hover {
    border-color: var(--color-gold);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 22px rgba(255, 200, 55, 0.2);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #150911;
    padding: 9px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    user-select: none;
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red {
    background: #ff3366;
    box-shadow: 0 0 6px rgba(255, 51, 102, 0.6);
}

.dot-yellow {
    background: #ffc837;
    box-shadow: 0 0 6px rgba(255, 200, 55, 0.6);
}

.dot-green {
    background: #00ff66;
    box-shadow: 0 0 6px rgba(0, 255, 102, 0.6);
}

.terminal-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #9d96a3;
    text-transform: uppercase;
}

.terminal-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 200, 55, 0.1);
    border: 1px solid rgba(255, 200, 55, 0.35);
    color: var(--color-gold);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-copy-btn:hover {
    background: var(--color-gold);
    color: #0c0609;
    box-shadow: 0 0 12px rgba(255, 200, 55, 0.6);
    transform: translateY(-1px);
}

.terminal-copy-btn.copied {
    background: #00ff66;
    border-color: #00ff66;
    color: #051408;
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.7);
}

.terminal-block .gh-content pre,
.terminal-block pre,
.gh-content pre {
    background: #090306 !important;
    border: none;
    border-radius: 0;
    padding: 18px 22px;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    box-shadow: none;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-gold);
    padding: 2px 6px;
    border-radius: 4px;
}

.gh-content pre code {
    background: transparent;
    padding: 0;
    color: #ececf2;
}

.gh-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-crimson), transparent);
    margin: 45px 0;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
}

.gh-content th, .gh-content td {
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}

.gh-content th {
    background: rgba(141, 22, 22, 0.4);
    color: var(--color-cream);
    font-family: var(--font-mono);
}

.gh-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

/* Article Footer */
.article-footer {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid var(--border-subtle);
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--color-gold);
}

/* Footer */
.site-footer {
    border-top: 2px solid var(--border-gold);
    background: rgba(12, 6, 9, 0.98);
    padding: 30px 25px;
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-muted);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-glow {
    color: var(--color-cream);
    font-weight: 700;
}

/* Ghost Koenig Editor Cards & Widths */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
    transform: translateX(0);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-image-card,
.kg-gallery-card,
.kg-embed-card {
    margin: 2.5em 0;
}

/* Responsive YouTube & Video Embeds */
.kg-embed-card,
.gh-content iframe {
    max-width: 100%;
}

.kg-embed-card iframe,
.gh-content iframe[src*="youtube.com"],
.gh-content iframe[src*="youtu.be"] {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 200, 55, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: block;
}

/* Twitter / X Embeds */
.twitter-tweet {
    margin: 30px auto !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6) !important;
}

.twitter-tweet-rendered {
    margin: 30px auto !important;
}

.kg-image-card figcaption,
.kg-gallery-card figcaption {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-muted);
    text-align: center;
    margin-top: 10px;
}

.kg-callout-card {
    display: flex;
    padding: 20px 24px;
    border-radius: 8px;
    background: rgba(141, 22, 22, 0.25);
    border: 1px solid var(--border-crimson);
    margin: 2em 0;
}

.kg-callout-emoji {
    font-size: 1.5rem;
    margin-right: 16px;
    line-height: 1;
}

.kg-callout-text {
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.6;
}

.kg-bookmark-card {
    width: 100%;
    margin: 2em 0;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none !important;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    color: var(--color-text) !important;
    transition: all 0.2s ease;
}

.kg-bookmark-container:hover {
    border-color: var(--color-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.kg-bookmark-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    justify-content: center;
}

.kg-bookmark-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-cream);
    margin-bottom: 6px;
}

.kg-bookmark-description {
    font-size: 0.85rem;
    color: var(--color-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-muted);
}

.kg-bookmark-thumbnail {
    position: relative;
    min-width: 33%;
    max-height: 100%;
}

.kg-bookmark-thumbnail img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    .nav {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-panel {
        padding: 30px 20px;
    }
    .article-container, .page-container {
        padding: 30px 20px;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .kg-width-wide,
    .kg-width-full {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        left: auto;
        right: auto;
    }
    .kg-bookmark-container {
        flex-direction: column;
    }
    .kg-bookmark-thumbnail {
        min-height: 160px;
    }
}

@media (max-width: 1240px) {
    .content-layout {
        grid-template-columns: 1fr 290px;
        gap: 24px;
    }
    .content-layout .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 950px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-column {
        position: static;
        margin-top: 25px;
    }
    .sidebar-feed {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .content-layout .posts-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-feed {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Miiverse "Yeah!" Button System (allnight.city)
   ========================================================================== */
.article-actions-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 28px 0 24px 0;
    padding: 0;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.miiverse-yeah-btn {
    position: relative;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(120, 216, 0, 0.08);
    border: 1.5px solid rgba(120, 216, 0, 0.38);
    color: #e4e4ed;
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

.miiverse-yeah-btn:hover {
    background: rgba(120, 216, 0, 0.16);
    border-color: #8be000;
    box-shadow: 0 0 16px rgba(120, 216, 0, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.miiverse-yeah-btn:active {
    transform: translateY(1px) scale(0.97);
}

.miiverse-yeah-btn.voted {
    background: linear-gradient(135deg, #78d800 0%, #4da000 100%);
    border-color: #a6ff00;
    color: #ffffff;
    box-shadow: 0 0 22px rgba(120, 216, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.miiverse-yeah-btn.voted .yeah-text {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.miiverse-yeah-btn.voted .yeah-count {
    background: rgba(0, 0, 0, 0.32);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.miiverse-yeah-btn .yeah-icon {
    display: block;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.miiverse-yeah-btn:hover .yeah-icon {
    transform: rotate(-6deg) scale(1.12);
}

.miiverse-yeah-btn.voted .yeah-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.miiverse-yeah-btn .yeah-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.2px;
    color: #f0f0f5;
    transition: color 0.2s ease;
}

.miiverse-yeah-btn .yeah-count {
    font-family: var(--font-mono);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(120, 216, 0, 0.3);
    border-radius: 999px;
    color: #88ff33;
    transition: all 0.2s ease;
}

/* Post Article Variant (Hero-level, prominent above article) */
.miiverse-yeah-btn-post {
    padding: 10px 24px;
    gap: 12px;
}

.miiverse-yeah-btn-post .yeah-icon {
    width: 28px;
    height: 28px;
}

.miiverse-yeah-btn-post .yeah-text {
    font-size: 1.35rem;
}

.miiverse-yeah-btn-post .yeah-count {
    font-size: 1rem;
    padding: 3px 11px;
    min-width: 28px;
    text-align: center;
}

/* Post Card Variant (Main Feed Cards) */
.miiverse-yeah-btn-card {
    padding: 5px 12px;
    gap: 7px;
}

.miiverse-yeah-btn-card .yeah-icon {
    width: 18px;
    height: 18px;
}

.miiverse-yeah-btn-card .yeah-text {
    font-size: 0.92rem;
}

.miiverse-yeah-btn-card .yeah-count {
    font-size: 0.8rem;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar Mini Variant (Community Radar) */
.miiverse-yeah-btn-mini {
    margin-left: auto;
    padding: 2px 7px;
    gap: 4px;
    border-width: 1px;
    background: rgba(120, 216, 0, 0.05);
}

.miiverse-yeah-btn-mini .yeah-icon {
    width: 13px;
    height: 13px;
}

.miiverse-yeah-btn-mini .yeah-count {
    font-size: 0.72rem;
    padding: 0 4px;
    border: none;
    background: transparent;
}

/* Pop Animation */
@keyframes yeahPop {
    0% { transform: scale(1); }
    35% { transform: scale(1.24); }
    70% { transform: scale(0.93); }
    100% { transform: scale(1); }
}

.miiverse-yeah-btn.pop-animate {
    animation: yeahPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   Feature A: Floating "+1" / "Yeah!" Particle Burst
   ========================================================================== */
.yeah-burst-particle {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(12, 20, 10, 0.95);
    border: 1.5px solid #78d800;
    box-shadow: 0 0 18px rgba(120, 216, 0, 0.7), 0 4px 10px rgba(0, 0, 0, 0.8);
    border-radius: 999px;
    padding: 3px 9px 3px 7px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
    font-style: italic;
    color: #9aff00;
    pointer-events: none;
    user-select: none;
    z-index: 1000;
    white-space: nowrap;
    animation: floatYeahBurst 0.75s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.yeah-burst-particle .burst-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.yeah-burst-particle .burst-text {
    line-height: 1;
    text-shadow: 0 0 8px rgba(120, 216, 0, 0.8);
}

@keyframes floatYeahBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, 4px) scale(0.6);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -14px) scale(1.18);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -32px) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -52px) scale(0.85);
    }
}

/* ==========================================================================
   Feature B: Supercharged Animated "Yeah!" Button (Community Favorites)
   ========================================================================== */
.post-card.community-favorite {
    border-color: rgba(120, 216, 0, 0.65) !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 24px rgba(120, 216, 0, 0.25) !important;
}

.post-card.community-favorite:hover {
    border-color: #9aff00 !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(120, 216, 0, 0.55) !important;
}

.post-card.community-favorite .post-card-ambient {
    opacity: 0.7 !important;
    filter: blur(34px) saturate(240%) !important;
}

/* Supercharged Animated Yeah! Button */
.miiverse-yeah-btn.is-hot {
    border-color: #8be000 !important;
    animation: yeahHotBreathe 2.4s infinite ease-in-out;
}

/* Diagonal holographic shine sweep across the button */
.miiverse-yeah-btn.is-hot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 80%
    );
    background-size: 250% 100%;
    background-position: 200% 0;
    pointer-events: none;
    z-index: 2;
    animation: yeahShineSweep 3s infinite ease-in-out;
}

@keyframes yeahHotBreathe {
    0%, 100% {
        box-shadow: 0 0 10px rgba(120, 216, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.6);
        border-color: rgba(120, 216, 0, 0.65);
    }
    50% {
        box-shadow: 0 0 24px rgba(120, 216, 0, 0.85), 0 0 35px rgba(120, 216, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.6);
        border-color: #9aff00;
    }
}

@keyframes yeahShineSweep {
    0% {
        background-position: 200% 0;
    }
    40%, 100% {
        background-position: -100% 0;
    }
}

/* Playful idle mascot wiggle on hot buttons */
.miiverse-yeah-btn.is-hot .yeah-icon {
    animation: yeahMascotIdle 3.6s infinite ease-in-out;
}

@keyframes yeahMascotIdle {
    0%, 75%, 100% {
        transform: rotate(0deg) scale(1);
    }
    80% {
        transform: rotate(-10deg) scale(1.18);
    }
    85% {
        transform: rotate(8deg) scale(1.18);
    }
    90% {
        transform: rotate(-4deg) scale(1.08);
    }
    95% {
        transform: rotate(0deg) scale(1);
    }
}

/* Energized count badge when hot */
.miiverse-yeah-btn.is-hot .yeah-count {
    background: rgba(120, 216, 0, 0.22);
    border: 1px solid #78d800;
    color: #ffffff;
    text-shadow: 0 0 6px #78d800;
    font-weight: 800;
}

/* Community Radar Sidebar Hot Dispatch */
.side-card.community-favorite {
    border-left: 3px solid #78d800 !important;
    background: rgba(120, 216, 0, 0.06);
}

.side-card.community-favorite .side-hot-tag {
    display: inline-block !important;
    background: rgba(120, 216, 0, 0.2);
    border: 1px solid #78d800;
    color: #9aff00;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 800;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
}

/* Post Page Hero Badge */
.article-fav-badge {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(14, 22, 12, 0.92);
    border: 1.5px solid #78d800;
    box-shadow: 0 0 16px rgba(120, 216, 0, 0.35);
    border-radius: 999px;
    padding: 8px 18px 8px 14px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 800;
    color: #9aff00;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    animation: favBadgeGlow 2.5s infinite alternate ease-in-out;
}

.article-fav-badge .badge-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.fav-badge-pulse {
    width: 7px;
    height: 7px;
    background: #9aff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #9aff00;
    animation: favDotPulse 1.5s infinite;
}

@keyframes favDotPulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}




