/* ============================================
   TALENTBUILDS - Base CSS
   Shared styles and CSS variables for all pages
   ============================================ */

/* CSS Variables - Override these in game-specific CSS */
:root {
    /* Colors - Dark grey with vibrant purple accents */
    --color-accent: #a855f7;
    --color-accent-hover: #c084fc;
    --color-accent-glow: rgba(168, 85, 247, 0.5);
    --color-accent-subtle: rgba(168, 85, 247, 0.08);
    --color-accent-border: rgba(168, 85, 247, 0.4);
    
    --color-bg-body: #0c0c0e;
    --color-bg-container: #161618;
    --color-bg-section: #111113;
    --color-bg-hover: #1e1e22;
    
    --color-border: #2a2a2e;
    --color-border-light: #3a3a40;
    
    --color-text: #e4e4e7;
    --color-text-muted: #a1a1aa;
    --color-text-dim: #71717a;
    --color-text-faint: #65656b;
    
    /* Typography */
    --font-main: 'Exo 2', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 20px;
    --content-padding: 16px;
    --section-padding: 16px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* Reset */
* {
    margin: 0;
    box-sizing: border-box;
}

/* Body - Flexbox for sticky footer */
body {
    font-family: var(--font-main);
    background: var(--color-bg-body);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.1) 0%, transparent 121vh);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 62px 0px 0px;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0px 3px 12px #000;
}

/* Page wrapper for side rails */
.page-wrapper {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: 0 20px;
}

/* Container inside page-wrapper should flex */
.page-wrapper > .container {
    flex: 0 1 var(--container-max-width);
    max-width: var(--container-max-width);
    margin: 0;
}

/* Left and Right Sidebars */
.page-wrapper > .sidebar-left,
.page-wrapper > .sidebar-right {
    flex: 0 0 300px;
    position: sticky;
    top: 62px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0px;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: 0px 3px 12px #000;
}

/* Hide left sidebar (temporarily disabled) */
.page-wrapper > .sidebar-left {
    display: none;
}

/* Hide left sidebar at 1600px */
@media (max-width: 1599px) {
    .page-wrapper > .sidebar-left {
        display: none;
    }
}

/* Hide right sidebar at 1200px */
@media (max-width: 1199px) {
    .page-wrapper {
        padding: 0;
    }
    
    .page-wrapper > .sidebar-right {
        display: none;
    }
    
    .page-wrapper > .container {
        flex: 1 1 auto;
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* ============================================
   Header
   ============================================ */
.header {
    position: relative; /* Allow absolute positioning of share button */
    background: linear-gradient(135deg, var(--color-bg-container) 0%, var(--color-bg-section) 100%);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-accent);
    padding: 50px;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);

}


.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-weight: 700;
}

.header h1 a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.header p {
    color: var(--color-text-muted);
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* ============================================
   Navigation - Fixed Top Bar
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 8px;
    background: var(--color-bg-section);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    animation: nav-glow 10s ease-in-out infinite;
}

@keyframes nav-glow {
    0%, 100% { box-shadow: 0 0px 4px var(--color-accent-subtle); }
    50% { box-shadow: 0 0px 8px var(--color-accent-glow); }
}

.site-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    max-width: calc(100vw - 250px); /* Leave room for brand */
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.site-nav .nav-right::-webkit-scrollbar {
    height: 4px;
}

.site-nav .nav-right::-webkit-scrollbar-track {
    background: transparent;
}

.site-nav .nav-right::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.site-nav .nav-right a {
    white-space: nowrap;
    flex-shrink: 0;
}

.site-nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
}

.site-nav a:hover {
    color: var(--color-accent-hover);
    background: var(--color-accent-subtle);
}

.site-nav a.active {
    color: var(--color-accent);
    font-weight: 600;
}

/* Discord button styling */
.nav-discord-btn {
    background: #5865F2 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-discord-btn:hover {
    background: #4752C4 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.nav-discord-btn svg {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    flex-shrink: 0;
}


/* Hamburger button - hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.site-nav.menu-open .nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.site-nav.menu-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
}

.site-nav.menu-open .nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.site-nav .nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.site-nav .nav-center {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
}

.site-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.site-nav .nav-brand-icon {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
}

.site-nav .nav-brand-text {
    font-weight: 600;
    letter-spacing: 1px;
    color: #a855f7 !important;
}

.site-nav .nav-brand:hover .nav-brand-text {
    color: #c084fc !important;
}

.site-nav .nav-brand-text-mobile {
    font-weight: 600;
    letter-spacing: 1px;
    color: #a855f7 !important;
    text-decoration: none;
}

.site-nav .nav-brand-text-mobile:hover {
    color: #c084fc !important;
}

/* Breadcrumb style nav (legacy, inside container) */
.nav {
    padding: 15px 30px;
    background: var(--color-bg-section);
    border-bottom: 1px solid var(--color-border);
}

.nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--color-accent-hover);
    text-shadow: 0 0 8px var(--color-accent-glow);
}

/* ============================================
   Footer - Sticky at bottom
   ============================================ */
.site-footer {
    flex-shrink: 0;
    background: var(--color-bg-section);
    border-top: 1px solid var(--color-border);
    padding: 24px 16px 110px;
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.85em;
    margin-top: 40px;
    width: 100%;
}


.site-footer a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--color-accent-hover);
}

.site-footer .footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    min-height: 40px;
}

/* Ko-Fi placeholder on left side */
.footer-kofi-placeholder {
    min-width: 200px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* Vertically center Ko-Fi widget */
.site-footer iframe[id*="kofi"],
.site-footer div[id*="kofi"],
.site-footer [id^="kofi"],
.site-footer [class*="kofi"] {
    vertical-align: middle !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Target Ko-Fi widget specifically and center it in placeholder */
.footer-kofi-placeholder iframe,
.footer-kofi-placeholder div[id*="kofi"],
.footer-kofi-placeholder [id^="kofi"] {
    margin: auto 0 !important;
    vertical-align: middle !important;
}

/* Also target Ko-Fi widgets that might be injected into footer */
.site-footer > iframe[id*="kofi"],
.site-footer > div[id*="kofi"] {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.site-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.site-footer .footer-copyright {
    color: var(--color-text-faint);
}

/* Discord dropdown button */
.footer-discord-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.footer-discord-btn {
    background: #5865F2;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.footer-discord-btn:hover {
    background: #4752C4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.footer-discord-btn svg {
    flex-shrink: 0;
}

.footer-discord-dropdown.open .footer-discord-btn svg:last-child {
    transform: rotate(180deg);
}

.footer-discord-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

.footer-discord-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--color-border);
}

.footer-discord-menu a:last-child {
    border-bottom: none;
}

.footer-discord-menu a:hover {
    background: var(--color-bg-hover);
    color: var(--color-accent);
}

/* ============================================
   Content Area
   ============================================ */
.content {
    padding: var(--content-padding);
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 2em;
    color: var(--color-accent);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.page-info {
    color: var(--color-text-muted);
    font-size: 1.05em;
    line-height: 1.4;
    margin-bottom: 30px;
    padding: 16px 16px 40px;
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-accent);
    position: relative;
    overflow: hidden;
}

/* Expandable functionality - can be added to any element */
.expandable {
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.expandable.collapsed {
    max-height: 100px;
}

.expandable.expanded {
    max-height: 2000px;
}

.expandable-toggle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 8px 12px;
    background: linear-gradient(to top, var(--color-bg-section) 0%, var(--color-bg-section) 23%, transparent 100%);
    text-align: center;
    cursor: pointer;
    color: var(--color-accent);
    font-size: 0.9em;
    font-weight: 600;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    pointer-events: none;
    margin-top: auto;
}

.expandable-toggle:hover {
    color: var(--color-accent-hover);
}

.expandable-toggle::after {
    content: '▼';
    display: inline-block;
    font-size: 0.8em;
}

.expandable.expanded .expandable-toggle::after {
    transform: rotate(180deg);
}

.section-title::before {
    content: "■";
    color: var(--color-accent);
    font-size: 0.6em;
}

/* ============================================
   Cards (Game Cards, Tool Cards)
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    min-height: 185px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    transition: border-color 0s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-bg-image, var(--color-bg-section));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease, filter 0.4s ease;
    z-index: 0;
    filter: blur(2px);
}

.card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.card:hover::before {
    transform: translateY(-4px) scale(1.1);
    filter: none;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.70) 40%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.card .swipe {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-accent-subtle), transparent);
    transition: left 0.5s;
    z-index: 2;
    pointer-events: none;
}

.card:hover .swipe {
    left: 100%;
}

.card > * {
    position: relative;
    z-index: 2;
}

.card h3 {
    font-size: 1.8em;
    color: var(--color-accent);
    margin-bottom: 0;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px #000, 1px 1px 4px #000, 1px 1px 3px #000;
}

/* ============================================
   News Articles (Shared)
   ============================================ */

.news-articles {
    margin-bottom: 40px;
}

.article-row {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.article-row:hover {
    border-color: var(--color-accent-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.article-image-col {
    flex: 0 0 30%;
    max-width: 30%;
}

.article-image-wrapper {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg-section);
}

.article-image-wrapper .article-type {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-accent-border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    white-space: nowrap;
}

.article-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-sm);
}

/* Desktop: fixed height, crop from center */
@media (min-width: 769px) {
    .article-image-wrapper {
        height: 250px;
    }

    .article-image {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

.article-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.article-image-wrapper:hover .article-image-overlay {
    background: var(--color-accent-subtle);
}

.article-content-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.article-title {
    margin: 0 0 15px 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--color-accent);
}

.article-title strong {
    font-weight: 700;
}

.article-description {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-meta {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.article-meta strong {
    color: var(--color-text-muted);
}

.article-read-more {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-accent);
    color: var(--color-bg-body);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-top: auto;
    align-self: flex-start;
}

.article-read-more:hover {
    color: var(--color-bg-body);
    background: var(--color-accent-hover);
    transform: translateY(-2px);
}

/* Mobile: cap image height and crop */
@media (max-width: 768px) {
    .article-row {
        flex-direction: column;
        gap: 10px;
    }

    .article-image-col {
        flex: 1 1 100%;
        max-width: 100%;
        padding-bottom: 0;
    }

    .article-image-wrapper {
        height: 200px;
        max-height: 200px;
    }

    .article-image {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .article-title {
        font-size: 1.25rem;
    }
}

.card p {
    color: var(--color-text);
    font-size: 0.9em;
    margin-top: 0;
    text-shadow: 2px 2px 1px #000;
}

/* Disabled Card Styling */
.card-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
    position: relative;
}

.card-disabled::before {
    display: none;
}

.card-disabled:hover {
    background: var(--color-bg-section) !important;
    border-color: var(--color-border) !important;
    transform: none !important;
    box-shadow: none !important;
}

.card-disabled h3 {
    color: #666 !important;
}

.card-disabled p {
    color: #888 !important;
    font-style: italic;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 12px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--color-bg-body);
    color: var(--color-accent);
    font-family: var(--font-main);
}

.btn:hover {
    background: var(--color-accent);
    color: var(--color-bg-body);
    border-color: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent-glow);
    transform: translateY(-2px);
}

.btn-primary {
    border-color: var(--color-accent);
}

.btn-secondary {
    border-color: var(--color-border-light);
    color: var(--color-text-muted);
}

.btn-secondary:hover {
    background: var(--color-border-light);
    color: #fff;
    border-color: var(--color-border-light);
    box-shadow: 0 0 15px rgba(74, 74, 90, 0.4);
}

.btn-danger {
    border-color: #8b0000;
    color: #ff4444;
}

.btn-danger:hover {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4);
}

/* ============================================
   Sections
   ============================================ */
.section {
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--section-padding);
    position: relative;
    margin-bottom: 20px;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-hover);
}

p {
    margin-bottom: 15px;
}

h3 {
    margin-top: 30px;
}

ul {
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* ============================================
   Activity Items (Checklist)
   ============================================ */
.activity-item {
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: stretch;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.3s;
}

.activity-item:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-accent);
    transform: translateX(3px);
    box-shadow: 0 0 15px var(--color-accent-subtle);
}

.activity-item:hover::before {
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent-glow);
}

.activity-item.completed {
    background: var(--color-accent-subtle);
    border-color: var(--color-accent-border);
}

.activity-item.completed::before {
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent-glow);
}

.activity-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 14px 12px 14px 16px;
    cursor: pointer;
    accent-color: var(--color-accent);
}

.activity-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.95em;
    user-select: none;
    color: var(--color-text);
    padding: 14px 16px 14px 0;
    display: flex;
    align-items: center;
}

.activity-item.completed label {
    color: var(--color-text-muted);
}

.activity-info {
    font-size: 0.75em;
    color: var(--color-text-faint);
    margin-left: 8px;
    font-style: italic;
}

h2, h3, h4, h5, h6 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}



/* ============================================
   Controls
   ============================================ */
.controls {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   Tables - Horizontal Scrolling
   ============================================ */
/* Make all tables horizontally scrollable on mobile */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Table wrapper for horizontal scrolling */
.table-wrapper,
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Ensure tables don't break layout on mobile */
@media (max-width: 768px) {
    /* Table wrapper for better mobile scrolling */
    .table-wrapper,
    .table-container {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: -ms-autohiding-scrollbar;
    }
    
    /* Tables inside wrappers should be full width but allow horizontal scroll */
    .table-wrapper table,
    .table-container table {
        width: 100%;
        min-width: 100%;
        display: table;
    }
    
    /* Tables without wrapper - keep original behavior for backwards compatibility */
    section table:not(.table-wrapper table):not(.table-container table),
    .section table:not(.table-wrapper table):not(.table-container table),
    .content table:not(.table-wrapper table):not(.table-container table) {
        min-width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Custom scrollbar for mobile */
    .table-wrapper::-webkit-scrollbar,
    .table-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-wrapper::-webkit-scrollbar-track,
    .table-container::-webkit-scrollbar-track {
        background: var(--color-bg-container);
        border-radius: 4px;
    }
    
    .table-wrapper::-webkit-scrollbar-thumb,
    .table-container::-webkit-scrollbar-thumb {
        background: var(--color-accent);
        border-radius: 4px;
    }
    
    .table-wrapper::-webkit-scrollbar-thumb:hover,
    .table-container::-webkit-scrollbar-thumb:hover {
        background: var(--color-accent-hover);
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 968px) {
    .sections-container {
        flex-direction: column;
    }

    .section {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Mobile hamburger menu */
    .nav-hamburger {
        display: block;
    }
    
    .site-nav .nav-right {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background: var(--color-bg-section);
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-height: 0;
        max-width: 100%;
        overflow: hidden;
        overflow-x: visible;
        transition: max-height 0.3s ease, border 0.3s ease;
        border-bottom: none;
    }
    
    .site-nav.menu-open .nav-right {
        max-height: 300px;
        padding: 10px 0;
        border-bottom: 1px solid var(--color-border);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--color-accent) var(--color-bg-section);
    }
    
    .site-nav.menu-open .nav-right::-webkit-scrollbar {
        width: 6px;
    }
    
    .site-nav.menu-open .nav-right::-webkit-scrollbar-track {
        background: var(--color-bg-section);
    }
    
    .site-nav.menu-open .nav-right::-webkit-scrollbar-thumb {
        background: var(--color-accent);
        border-radius: 3px;
    }
    
    .site-nav.menu-open .nav-right::-webkit-scrollbar-thumb:hover {
        background: var(--color-accent-hover);
    }
    
    .site-nav .nav-right a {
        display: block;
        width: 100%;
        padding: 12px 30px;
        border-radius: 0;
        text-align: center;
        order: 0; /* Reset order on mobile */
    }
    
    .site-nav .nav-right a:hover {
        background: var(--color-bg-hover);
    }

    .header h1 {
        font-size: 1.8em;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Activity items - smaller padding and stacked layout on mobile */
    .activity-item input[type="checkbox"] {
        margin: 10px 10px 10px 12px;
    }
    
    .activity-item label {
        padding: 10px 12px 10px 0;
        flex-wrap: wrap;
    }
    
    .activity-info {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    /* Mobile nav layout: icon left, text center, hamburger right */
    .site-nav {
        justify-content: space-between;

    }
    
    .site-nav .nav-left {
        flex: 0 0 auto;
        justify-content: flex-start;
    }
    
    .site-nav .nav-left .nav-brand-text {
        display: none;
    }
    
    .site-nav .nav-center {
        display: flex;
        flex: 1;
        justify-content: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: none;
        z-index: 999;
    }
    
    .site-nav .nav-center .nav-brand-text-mobile {
        pointer-events: auto;
    }
    
    .site-nav .nav-hamburger {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* ============================================
   Floating Discord Button
   ============================================ */
.floating-discord-container {
    position: fixed;
    bottom: 16px;
    right: 20px;
    z-index: 998;
}

.floating-discord-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #5865F2;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9em;
    transition: transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.floating-discord-button:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 2px 2px 8px #000;
    color: white;
}

.floating-discord-button:active {
    transform: translateY(0);
}

.floating-discord-button svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.floating-discord-text {
    white-space: nowrap;
}

.floating-discord-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    overflow: hidden;
    z-index: 999;
}

.floating-discord-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.9em;
    transition: background 0.2s;
    border-bottom: 1px solid var(--color-border);
}

.floating-discord-menu a:last-child {
    border-bottom: none;
}

.floating-discord-menu a:hover {
    background: var(--color-bg-hover);
    color: var(--color-accent);
}

/* Lower z-index for widgets on screens under 1200px so ads appear above */
@media (max-width: 1199px) {
    .floating-discord-container {
        z-index: 1;
    }
    
    /* Ko-Fi widget - target the iframe/div that gets injected */
    iframe[id*="kofi"],
    div[id*="kofi"],
    [id^="kofi"],
    [class*="kofi"] {
        z-index: 1 !important;
    }
}

@media (max-width: 768px) {
    .floating-discord-container {
        bottom: 100px;
        right: 15px;
    }
    
    .floating-discord-button {
        padding: 0;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        justify-content: center;
    }
    
    .floating-discord-text {
        display: none; /* Hide text on mobile, show only icon */
    }
    
    .floating-discord-menu {
        right: 0;
        min-width: 160px;
    }
    
    /* Ko-Fi widget - push up on mobile */
    iframe[id*="kofi"],
    div[id*="kofi"],
    [id^="kofi"],
    [class*="kofi"] {
        bottom: 100px !important;
    }
}

/* Ad Styles */
.ad-wrapper {
    background: transparent;
    border-radius: 4px;
    text-align: center;
    outline: none;
    margin: 20px 0;
    position: relative;
}

.ad-wrapper > div {
    position: relative;
    z-index: 1;
}

/* Ad wrappers in sidebars - no background or border */
.page-wrapper > .sidebar-left .ad-wrapper,
.page-wrapper > .sidebar-right .ad-wrapper {
    background: transparent;
    outline: none;
    margin: 0;
}

/* Specific min-heights based on ad size to prevent layout shift */
.page-wrapper > .sidebar-left .ad-wrapper [data-ad*="rail-1"],
.page-wrapper > .sidebar-right .ad-wrapper [data-ad*="rail-1"] {
    min-height: 250px; /* rail-1: 300x300 */
    display: block;
}

.page-wrapper > .sidebar-left .ad-wrapper [data-ad*="rail-2"],
.page-wrapper > .sidebar-right .ad-wrapper [data-ad*="rail-2"] {
    min-height: 600px; /* rail-2: 300x600 */
    display: block;
}

/* Sticky ad wrapper */
.ad-wrapper-sticky {
    position: sticky;
    top: 90px;
    z-index: 10;
}

/* Sidebar navigation */
.rail-nav {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.rail-nav-content {
    display: block;
}

/* Custom sidebar content */
.rail-custom {
    display: block;
}

/* Sidebar widgets */
.sidebar-widget {
    margin: 10px 0;
}

.sidebar-widget-title {
    color: var(--color-accent);
    margin: 0 0 15px 0;
    padding: 0 4px 2px;
    border-bottom: 2px solid;
    text-transform: uppercase;
}

/* Featured Games Widget */
.featured-games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.featured-game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all 0.2s;
}

.featured-game-item:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-accent);
    transform: translateX(2px);
}

.featured-game-image {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.featured-game-name {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.billboard-container {
    width: 100%;
    max-width: 970px;
    margin: 20px auto;
}

.leaderboard-container {
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
}

.video-container {
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
}

.anchor-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
}

.mobile-unit-container {
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
}


@media (max-width: 1199px) {
    .mobile-unit-container {
        display: block;
    }
}

@media (min-width: 1200px) {
    .mobile-unit-container {
        display: none;
    }
}

/* Share Button */
.article-share-container {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

/* When positioned absolutely in header (bottom right corner) */
.header > .article-share-container {
    position: absolute;
    bottom: 4px;
    right: 4px;
    margin-left: 0;
    z-index: 10;
}

.article-share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-accent);
    color: var(--color-bg-body);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.article-share-button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
}

.article-share-button:active {
    transform: translateY(0);
}

.article-share-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Share Popup */
.share-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* When in header (bottom right), popup appears above the button */
.header > .article-share-container > .share-popup {
    top: auto;
    bottom: calc(100% + 10px);
    transform: translateY(10px);
}

.header > .article-share-container > .share-popup.show {
    transform: translateY(0);
}

.share-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.share-option:hover {
    background: var(--color-bg-hover);
    color: var(--color-accent);
}

.share-option svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.share-option-name {
    font-weight: 500;
}

@media (max-width: 768px) {
    /* Full width only for article-meta containers, not header containers */
    .article-meta .article-share-container {
        margin-left: 0;
        width: 100%;
        order: 2;
    }
    
    .article-meta .article-share-button {
        padding: 8px 16px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    /* Header containers stay compact on mobile */
    .header > .article-share-container {
        position: absolute;
        bottom: 4px;
        right: 4px;
        width: auto;
    }
    
    .header > .article-share-button {
        padding: 8px 12px;
        font-size: 0.85rem;
        width: auto;
    }
    
    .share-popup {
        right: 0;
    }
}

