/* ==========================================================================
   Overwatch Player Count - Blog & Editorial Design System
   Matches SteamDB Dark Aesthetic (:root palette, fonts, spacing, tables)
   ========================================================================== */

:root {
    --bg-dark: #121923;
    --bg-panel: #171d25;
    --bg-header: #212b40;
    --bg-card: #16202d;
    --bg-card-hover: #1e2a3b;
    --bg-surface: #10151c;
    --text-main: #d2d2d2;
    --text-bright: #ffffff;
    --text-muted: #8f98a0;
    --link-blue: #4f94bc;
    --steam-blue: #66c0f4;
    --steam-blue-glow: rgba(102, 192, 244, 0.15);
    --steam-green: #5c7e10;
    --stat-green: #6c3;
    --stat-red: #ff4c4c;
    --rating-red: #a94847;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-subtle: #252f3a;
    --border-focus: #66c0f4;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --transition-fast: 0.18s ease-in-out;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--steam-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #a4d0f5;
    text-decoration: underline;
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* ==========================================================================
   Global Header & Navigation
   ========================================================================== */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    background-color: rgba(33, 43, 64, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
    color: var(--steam-blue);
}

.site-logo i {
    font-size: 24px;
    color: var(--steam-blue);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: #d2d2d2;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(102, 192, 244, 0.12);
    color: var(--steam-blue);
    border-color: rgba(102, 192, 244, 0.3);
}

.nav-cta-btn {
    background: var(--steam-green);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.nav-cta-btn:hover {
    background: #6e9714;
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Containers & Layout
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--steam-blue);
}

.breadcrumbs span.separator {
    color: rgba(255, 255, 255, 0.2);
}

.breadcrumbs span.current {
    color: var(--text-main);
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Blog Index Page (/blog)
   ========================================================================== */
.blog-hero {
    text-align: center;
    padding: 30px 0 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 35px;
}

.blog-hero h1 {
    font-size: 2.4rem;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.blog-hero p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 650px;
    margin: 0 auto;
}

/* Blog Filter & Search Toolbar */
.blog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-panel);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-pill:hover, .filter-pill.active {
    background: rgba(102, 192, 244, 0.15);
    color: var(--steam-blue);
    border-color: rgba(102, 192, 244, 0.4);
}

.search-box {
    position: relative;
    min-width: 260px;
}

.search-box input {
    width: 100%;
    padding: 8px 14px 8px 34px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--border-focus);
    background: #1b2430;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
}

/* Article Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
}

.article-card:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 192, 244, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #0b0f14;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .card-img-wrap img {
    transform: scale(1.03);
}

.card-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(22, 32, 45, 0.88);
    backdrop-filter: blur(4px);
    color: var(--steam-blue);
    border: 1px solid rgba(102, 192, 244, 0.3);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-meta i {
    font-size: 11px;
}

.card-title {
    font-size: 1.15rem;
    line-height: 1.4;
    color: #fff;
    margin: 0 0 10px;
    font-weight: 600;
}

.card-title a {
    color: #fff;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--steam-blue);
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
}

.read-btn {
    font-size: 13px;
    color: var(--steam-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.read-btn:hover {
    color: #a4d0f5;
    text-decoration: none;
}

.read-btn i {
    font-size: 11px;
    transition: transform var(--transition-fast);
}

.article-card:hover .read-btn i {
    transform: translateX(4px);
}

/* Pagination / Load More */
.pagination-container {
    text-align: center;
    margin-top: 30px;
}

.btn-load-more {
    padding: 10px 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-load-more:hover {
    background: rgba(102, 192, 244, 0.15);
    border-color: var(--steam-blue);
    color: var(--steam-blue);
}

/* ==========================================================================
   Article Detail Page Layout
   ========================================================================== */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
    align-items: start;
}

.article-main {
    min-width: 0;
    max-width: 820px;
}

/* Article Header */
.article-header {
    margin-bottom: 25px;
}

.article-category {
    display: inline-block;
    color: var(--steam-blue);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding: 3px 8px;
    background: rgba(102, 192, 244, 0.1);
    border: 1px solid rgba(102, 192, 244, 0.25);
    border-radius: 2px;
}

.article-h1 {
    font-size: 2.25rem;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.author-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102, 192, 244, 0.3);
}

.author-name {
    color: #fff;
    font-weight: 600;
    display: block;
}

.author-role {
    font-size: 12px;
    color: var(--text-muted);
}

.article-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Feature Image */
.feature-image-wrap {
    margin: 25px 0 35px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #0b0f14;
}

.feature-image-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Article Content & Typography */
.article-body {
    font-size: 15.5px;
    color: #d6dbe0;
    line-height: 1.8;
}

.article-body p {
    margin: 0 0 20px;
}

.article-body h2 {
    font-size: 1.6rem;
    color: #fff;
    margin: 40px 0 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: 80px;
}

.article-body h3 {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin: 28px 0 12px;
    font-weight: 600;
    scroll-margin-top: 80px;
}

.article-body strong {
    color: #fff;
}

/* Lists */
.blog-list, .blog-list-numbered {
    margin: 0 0 24px;
    padding-left: 24px;
}

.blog-list li, .blog-list-numbered li {
    margin-bottom: 8px;
    color: #cbd5e1;
}

.blog-list li::marker {
    color: var(--steam-blue);
}

/* Responsive Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 28px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.blog-table th, .blog-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #252f3a;
}

.blog-table th {
    background-color: #1b2838;
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid #324357;
}

.blog-table tr:first-child td {
    font-weight: 600;
    color: #fff;
    background-color: #1a2432;
}

.blog-table tr:hover {
    background-color: #1d2a3a;
}

.blog-table td:first-child {
    color: var(--text-bright);
}

/* Inline Images / Figures */
.blog-figure {
    margin: 32px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-card);
}

.blog-figure img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.blog-figure figcaption {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    background-color: #131b24;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Callout Box */
.callout-box {
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.08), rgba(22, 32, 45, 0.6));
    border-left: 4px solid var(--steam-blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px 20px;
    margin: 25px 0;
    font-size: 14.5px;
    color: #e2e8f0;
}

.callout-box i {
    color: var(--steam-blue);
    margin-right: 8px;
}

/* ==========================================================================
   Article Sidebar (TOC & Sticky Widgets)
   ========================================================================== */
.article-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--steam-blue);
    font-size: 13px;
}

/* Table of Contents */
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) transparent;
}

.toc-item {
    margin-bottom: 6px;
}

.toc-item.level-3 {
    padding-left: 14px;
    font-size: 12.5px;
}

.toc-link {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    padding: 4px 6px;
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.toc-link:hover, .toc-link.active {
    color: var(--steam-blue);
    background: rgba(102, 192, 244, 0.1);
    text-decoration: none;
}

/* Tracker CTA Widget */
.cta-widget {
    background: linear-gradient(180deg, #1b2838 0%, #16202d 100%);
    border: 1px solid rgba(102, 192, 244, 0.3);
    text-align: center;
}

.cta-widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.cta-widget-text {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.cta-btn-launch {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--steam-green);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.cta-btn-launch:hover {
    background: #6e9714;
    color: #fff;
    text-decoration: none;
}

/* Social Share Controls */
.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: rgba(102, 192, 244, 0.2);
    color: var(--steam-blue);
    border-color: var(--steam-blue);
}

/* ==========================================================================
   Article Footer Sections (Author Box, Prev/Next, Related)
   ========================================================================== */
.article-footer-nav {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Author Box */
.author-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.author-box-img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102, 192, 244, 0.4);
    flex-shrink: 0;
}

.author-box-info h4 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 16px;
}

.author-box-role {
    font-size: 12.5px;
    color: var(--steam-blue);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.author-box-bio {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Prev / Next Article Navigation */
.prev-next-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.prev-next-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.prev-next-card:hover {
    background: var(--bg-card);
    border-color: rgba(102, 192, 244, 0.4);
    text-decoration: none;
}

.prev-next-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prev-next-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.prev-next-card:hover .prev-next-title {
    color: var(--steam-blue);
}

/* Related Articles */
.related-section {
    margin-top: 50px;
}

.related-section-title {
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
    background-color: #0d121a;
    border-top: 1px solid var(--border-color);
    padding: 40px 20px 30px;
    margin-top: 80px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin: 0 0 14px;
    letter-spacing: -0.2px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--steam-blue);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

/* Toast notification for copy link */
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-header);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--steam-blue);
    font-size: 13px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 9999;
    pointer-events: none;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
        order: 2;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .prev-next-nav {
        grid-template-columns: 1fr;
    }
    
    .article-h1 {
        font-size: 1.7rem;
    }
    
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
