@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600;700&family=Raleway:wght@500;600;700;800&display=swap');

/* ============================================
   42CODE BLOG - Design System
   Reddit-accurate color palette with system theme
   ============================================ */

/* ---- THEME ---- */
:root {
    --bg-root: #FFFFFF;
    --bg-surface: #FFFFFF;
    --bg-elevated: #F6F7F8;
    --bg-overlay: #FFFFFF;
    --bg-topbar: #FFFFFF;
    --bg-hover: rgba(0, 0, 0, 0.06);
    --bg-active: rgba(0, 0, 0, 0.1);

    --border-default: #C6C9CE;
    --border-hover: #878A8C;
    --border-active: #1C1C1C;

    --text-primary: #1C1C1C;
    --text-secondary: #575A5C;
    --text-tertiary: #6B6D70;
    --text-disabled: #A5A8AB;

    --accent-orange: #1C1C1C;
    --accent-orange-dim: rgba(28, 28, 28, 0.1);
    --accent-blue: #7A28CB;
    --accent-blue-dim: rgba(122, 40, 203, 0.1);
    --accent-red: #EA0027;
    --color-upvote: #7A28CB;
    --color-downvote: #1C1C1C;

    --gradient-mixed: linear-gradient(135deg, #1C1C1C, #878A8C);
    --gradient-hero: none;
    --btn-text-color: #ffffff;

    /* Topbar-specific */
    --border-topbar: var(--accent-blue);
    --title-topbar: #1C1C1C;

    /* Card/Sidebar overrides (same as default in light mode) */
    --card-title-color: #1C1C1C;
    --card-meta-color: #575A5C;
    --card-desc-color: #6B6D70;
    --sidebar-title-color: #6B6D70;
    --sidebar-text-color: #575A5C;
    --input-text-color: #1C1C1C;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Inter', sans-serif;
    --font-popup: 'Raleway', sans-serif;

    /* Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Logo Visibility in Light Theme */
    --logo-filter: invert(1) hue-rotate(180deg);
}

[data-theme="dark"] {
    --bg-root: #1A1A1B;
    --bg-surface: #1A1A1B;
    --bg-elevated: #313135;
    --bg-overlay: #1A1A1B;
    --bg-topbar: #1A1A1B;
    --bg-hover: rgba(255, 255, 255, 0.06);
    --bg-active: rgba(255, 255, 255, 0.1);

    --border-default: #343536;
    --border-hover: #818384;
    --border-active: #D7DADC;

    --text-primary: #D7DADC;
    --text-secondary: #818384;
    --text-tertiary: #818384;
    --text-disabled: #46494A;

    --accent-orange: #FFFFFF;
    --accent-orange-dim: rgba(255, 255, 255, 0.15);
    --accent-blue: #9D4EDD;
    --accent-blue-dim: rgba(157, 78, 221, 0.15);
    --color-upvote: #9D4EDD;
    --color-downvote: #FFFFFF;

    --gradient-mixed: linear-gradient(135deg, #D7DADC, #818384);

    /* Topbar-specific */
    --border-topbar: var(--accent-blue);
    --title-topbar: #D7DADC;

    /* Card/Sidebar overrides (same as default in dark mode) */
    --card-title-color: #D7DADC;
    --card-meta-color: #818384;
    --card-desc-color: #818384;
    --sidebar-title-color: #818384;
    --sidebar-text-color: #818384;
    --input-text-color: #D7DADC;
    --logo-filter: none;
}

/* Cyberpunk (Edgerunners) Theme */
[data-theme="cyber"] {
    --bg-root: #ded300;
    /* Cyberpunk Yellow */
    --bg-surface: #0b0f19;
    /* Black cards and sidebars */
    --bg-elevated: #000000;
    /* Pure black modals */
    --bg-overlay: rgba(0, 0, 0, 0.85);
    --bg-topbar: #000000;
    /* Black Topbar */
    --bg-hover: rgba(14, 128, 136, 0.634);
    /* Cyan Hover */
    --bg-active: rgba(255, 0, 60, 0.582);
    --border-topbar: #00f0ff;
    --border-default: #2c2c2c;
    /* Cyan borders for cards */
    --border-hover: #00f0ff;
    /* Magenta borders on hover */
    --border-active: #fcee0a;
    /* Yellow active */
    --title-topbar: #fcee0a;
    --text-primary: #000000;
    /* Black text for elements sitting directly on yellow root */
    --text-secondary: #333333;
    /* Dark gray for secondary text on yellow */
    --text-tertiary: #555555;
    --text-disabled: #777777;

    /* Specific overrides for black cards/sidebars */
    --card-title-color: #00f0ff;
    /* Blue titles */
    --card-meta-color: #ff003c;
    /* Red versions/players */
    --card-desc-color: #ffffff;
    /* White general text inside cards */
    --sidebar-title-color: #00f0ff;
    --sidebar-text-color: #ffffff;
    --input-text-color: #ffffff;

    --accent-orange: #ff002f;
    /* Magenta */
    --accent-orange-dim: rgba(255, 0, 60, 0.15);
    --accent-blue: #00b7c4;
    /* Cyan Buttons/Accents */
    --accent-blue-dim: rgba(0, 240, 255, 0.15);
    --color-upvote: #00f0ff;
    --color-downvote: #ff003c;

    --gradient-mixed: linear-gradient(135deg, #00f0ff, #ff003c);
    --btn-text-color: #000000;
    /* Black text on Cyan buttons */
}

/* Retro 80s / Synthwave Theme */
[data-theme="retro"] {
    /* ── Backgrounds ── */
    --bg-root: #12071f;
    /* Deep midnight purple */
    --bg-surface: #1a0d30;
    /* Card/panel bg */
    --bg-elevated: #0d0519;
    /* Topbar & modals: darkest layer */
    --bg-overlay: rgba(8, 2, 18, 0.92);
    --bg-topbar: #0d0519;
    --bg-hover: rgba(225, 0, 255, 0.12);
    --bg-active: rgba(255, 183, 0, 0.18);

    /* ── Borders ── */
    --border-topbar: #e100ff;
    /* Hot magenta topbar line */
    --border-default: #2d1155;
    /* Subtle purple card edges */
    --border-hover: #e100ff;
    /* Magenta on hover */
    --border-active: #ffe600;
    /* Electric yellow active */

    /* ── Topbar Text ── */
    --title-topbar: #ffe600;
    /* Electric yellow logo */

    /* ── General Text ── */
    --text-primary: #f2e9ff;
    /* Soft white-lavender */
    --text-secondary: #b47fff;
    /* Muted purple */
    --text-tertiary: #7340b5;
    /* Dim purple */
    --text-disabled: #3d1e72;

    /* ── Card / Sidebar Overrides ── */
    --card-title-color: #e100ff;
    /* Magenta title */
    --card-meta-color: #ffe600;
    /* Electric yellow version/players */
    --card-desc-color: #c9aeff;
    /* Soft lavender description */
    --sidebar-title-color: #e100ff;
    --sidebar-text-color: #c9aeff;
    --input-text-color: #f2e9ff;

    /* ── Accents ── */
    --accent-orange: #ffe600;
    /* Yellow — upvote/nav active */
    --accent-orange-dim: rgba(255, 230, 0, 0.15);
    --accent-blue: #e100ff;
    /* Magenta — buttons/links */
    --accent-blue-dim: rgba(225, 0, 255, 0.15);
    --color-upvote: #ffe600;
    --color-downvote: #00f5ff;

    /* ── Shadow / Glow ── */
    --shadow-sm: 0 1px 4px rgba(225, 0, 255, 0.2);
    --shadow-md: 0 2px 12px rgba(225, 0, 255, 0.25);
    --shadow-lg: 0 8px 32px rgba(225, 0, 255, 0.3);

    --gradient-mixed: linear-gradient(135deg, #e100ff, #ffe600);
    --btn-text-color: #12071f;
    /* Dark text on magenta button */
}

/* Bioshock / Steampunk Theme */
[data-theme="steampunk"] {
    /* ── Backgrounds ── */
    --bg-root: #1c1610;
    /* Dark aged wood */
    --bg-surface: #231a12;
    /* Card panels: slightly lighter */
    --bg-elevated: #160f08;
    /* Topbar/modals: darkest */
    --bg-overlay: rgba(10, 7, 3, 0.92);
    --bg-topbar: #160f08;
    --bg-hover: rgba(194, 142, 14, 0.18);
    /* Gold hover */
    --bg-active: rgba(74, 142, 153, 0.22);
    /* Teal active */

    /* ── Borders ── */
    --border-topbar: #c28e0e;
    /* Brass gold topbar line */
    --border-default: #2e2419;
    /* Dark wood edge */
    --border-hover: #c28e0e;
    /* Brass on hover */
    --border-active: #4a8e99;
    /* Bioshock teal active */

    /* ── Topbar Text ── */
    --title-topbar: #d4a017;
    /* Warm gold logo */

    /* ── General Text ── */
    --text-primary: #e8d5b7;
    /* Warm parchment */
    --text-secondary: #a8917a;
    /* Aged leather brown */
    --text-tertiary: #6e5a48;
    /* Dark leather */
    --text-disabled: #3e2f22;

    /* ── Card / Sidebar Overrides ── */
    --card-title-color: #4ab5c4;
    /* Bioshock aqua title */
    --card-meta-color: #d4a017;
    /* Warm gold version/players */
    --card-desc-color: #c9b8a0;
    /* Faded parchment description */
    --sidebar-title-color: #d4a017;
    --sidebar-text-color: #c9b8a0;
    --input-text-color: #e8d5b7;

    /* ── Accents ── */
    --accent-orange: #d4a017;
    /* Warm gold — nav active/upvote */
    --accent-orange-dim: rgba(212, 160, 23, 0.15);
    --accent-blue: #b87c36;
    /* Copper — buttons */
    --accent-blue-dim: rgba(184, 124, 54, 0.2);
    --color-upvote: #d4a017;
    --color-downvote: #4ab5c4;

    /* ── Shadows (warm amber glow) ── */
    --shadow-sm: 0 1px 4px rgba(194, 142, 14, 0.18);
    --shadow-md: 0 2px 12px rgba(194, 142, 14, 0.22);
    --shadow-lg: 0 8px 32px rgba(194, 142, 14, 0.28);

    --gradient-mixed: linear-gradient(135deg, #b87c36, #4ab5c4);
    --btn-text-color: #160f08;
    /* Dark text on copper/gold button */
}

/* ============ RESET & BASE ============ */
.no-transitions * {
    transition: none !important;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    background: var(--bg-root);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.game-card-title,
.title-topbar,
.feature-title,
.sidebar-section-title,
.rpost-title {
    font-family: var(--font-heading);
}

.custom-modal-header h3,
.custom-modal h3,
.modal-box h3,
.toast,
.empty-state h3 {
    font-family: var(--font-popup);
}

main::before {
    display: none;
}

/* Selection */
::selection {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-active);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ TOPBAR ============ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border-topbar);
    padding: 3px 0;
}

.topbar-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo-bracket {
    color: var(--text-tertiary);
    font-weight: 400;
}

.logo-text {
    color: var(--title-topbar);
}

.logo-dot {
    color: var(--accent-orange);
}

.logo-sub {
    color: var(--text-secondary);
}

.logo:hover .logo-bracket {
    color: var(--accent-orange);
}

/* Nav */
.topbar-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding-bottom: 24px;
    flex-wrap: wrap;
}

/* Minimal Dropdown for More Button */
.more-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
}

.dropdown-menu.active {
    display: flex;
    animation: fadeInDown 0.2s ease-out forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-active);
}

.dropdown-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-item-left svg {
    color: var(--text-secondary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-item.active {
    color: var(--accent-orange);
    background: var(--accent-orange-dim);
}

.nav-item.active svg {
    color: var(--accent-orange);
}

/* Actions */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--title-topbar);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    color: var(--accent-blue);
    background: var(--bg-hover);
}

/* User Profile Trigger Global Override */
.user-profile-trigger {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--title-topbar) !important;
}

.user-profile-trigger:hover {
    background: var(--bg-hover) !important;
}

.user-profile-trigger span,
.user-profile-trigger svg {
    color: var(--title-topbar) !important;
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    background: var(--accent-red);
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--accent-blue);
    border-radius: 9999px;
    color: var(--accent-blue);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    text-decoration: none;
    white-space: nowrap;
}

.btn-login:hover {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.btn-login.filled {
    background: var(--accent-blue);
    color: var(--btn-text-color);
}

.btn-login.filled:hover {
    filter: brightness(1.15);
}

/* Reddit-style Kayıt Ol (outline) butonu */
.btn-signup {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--text-primary);
    border-radius: 9999px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    text-decoration: none;
    white-space: nowrap;
}

.btn-signup:hover {
    background: var(--bg-active);
}



/* ============ MAIN CONTENT ============ */
.main-content {
    min-height: calc(100vh - 75px);
    background: var(--gradient-hero);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 48px 0 32px;
    gap: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent-blue);
}

.breadcrumb .separator {
    color: var(--border-active);
}

.breadcrumb .current {
    color: var(--text-secondary);
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.title-highlight {
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 15px;
    color: var(--text-tertiary);
    max-width: 480px;
}

/* Stats Mini */
.stats-mini {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.stats-mini-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-mini-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-mini-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-mini-divider {
    width: 1px;
    height: 32px;
    background: var(--border-default);
}

/* ============ FILTER BAR ============ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* Search */
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 420px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--input-text-color, var(--text-primary));
    font-size: 13px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
}

.search-input::placeholder {
    color: var(--text-disabled);
}

.search-shortcut {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-tertiary);
    pointer-events: none;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.filter-tab.active {
    color: var(--accent-orange);
    background: var(--accent-orange-dim);
    border-color: transparent;
}

.filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.filter-tab.active .filter-dot {
    opacity: 1;
}

/* Sort */
.sort-select {
    padding: 8px 32px 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all var(--transition-fast);
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* ============ GAMES GRID ============ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}

/* Game Card */
.game-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    border-color: var(--border-hover);
}

.game-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.04);
}

.game-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-blue);
    border-radius: 50%;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.game-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-card-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--card-title-color, var(--text-primary));
    line-height: 1.2;
    margin: 0;
}

.game-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-card-version {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--card-meta-color, var(--text-primary));
}

.game-card-players {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--card-meta-color, var(--text-primary));
}

.game-card-description {
    font-size: 13px;
    color: var(--card-desc-color, var(--text-tertiary));
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tag {
    padding: 3px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============ LIST VIEW MODE ============ */
#gamesGrid.list-view>div {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

#gamesGrid.list-view .game-card {
    display: flex;
    flex-direction: row;
    height: auto;
}

#gamesGrid.list-view .game-card-image {
    width: 240px;
    height: auto;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

#gamesGrid.list-view .game-card-image img {
    height: 100%;
    object-fit: cover;
}

#gamesGrid.list-view .game-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 768px) {
    #gamesGrid.list-view .game-card {
        flex-direction: column;
        height: auto;
    }

    #gamesGrid.list-view .game-card-image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    #gamesGrid.list-view .game-card-body {
        padding: 16px;
    }
}

/* ============ SKELETON LOADING ============ */
.game-card.skeleton {
    pointer-events: none;
}

.skeleton-image {
    aspect-ratio: 16 / 9;
    height: auto;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 12px;
    background: var(--bg-elevated);
    border-radius: 4px;
    margin-bottom: 10px;
    animation: shimmer 1.5s infinite;
}

.skeleton-line.w-75 {
    width: 75%;
}

.skeleton-line.w-100 {
    width: 100%;
}

.skeleton-line.w-60 {
    width: 60%;
}

.skeleton-line.w-50 {
    width: 50%;
}

.skeleton-line.w-40 {
    width: 40%;
}

.skeleton-line.w-80 {
    width: 80%;
}

.skeleton-line.w-55 {
    width: 55%;
}

@keyframes shimmer {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.5;
    }
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

/* ============ THEME CARDS ============ */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.theme-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.theme-card-label input[type="radio"] {
    display: none;
}

.theme-card {
    width: 100%;
    aspect-ratio: 1 / 1.25;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-default);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-root);
    transition: all 0.2s;
}

.theme-card-label input[type="radio"]:checked+.theme-card {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--accent-blue-dim);
}

.theme-card-top {
    flex: 1.5;
    border-radius: 4px;
}

.theme-card-mid,
.theme-card-bot {
    flex: 1;
    display: flex;
    gap: 6px;
}

.theme-card-mid>div,
.theme-card-bot>div {
    flex: 1;
    border-radius: 4px;
}

.theme-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-radio-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-blue);
    transform: scale(0);
    transition: all 0.2s;
}

.theme-card-label input[type="radio"]:checked~.theme-radio-circle {
    border-color: var(--accent-blue);
}

.theme-card-label input[type="radio"]:checked~.theme-radio-circle::after {
    transform: scale(1);
}

.theme-card-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.theme-card-label input[type="radio"]:checked~.theme-card-name {
    color: var(--text-primary);
}

.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 50%;
    margin-bottom: 24px;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--accent-blue-dim);
}

/* ============ CUSTOM MODAL ============ */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.custom-modal {
    width: 100%;
    max-width: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border-topbar);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-topbar);
    background: var(--bg-elevated);
}

.custom-modal-tabs {
    display: flex;
    gap: 4px;
}

.custom-modal-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.custom-modal-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-blue);
}

.custom-modal-tab:hover:not(.active) {
    color: var(--text-secondary);
}

.custom-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.custom-modal-close:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.custom-modal-body {
    padding: 24px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
}

.input-group input::placeholder {
    color: var(--text-disabled);
}

.btn-primary {
    padding: 10px 20px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.btn-primary:hover {
    background: #4b8ce5;
    box-shadow: var(--shadow-glow-blue);
}

.btn-block {
    width: 100%;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spin {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--accent-red-dim);
    border: 1px solid rgba(245, 101, 101, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-red);
    font-size: 13px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-default);
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: var(--text-tertiary);
}

.footer-text a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-text a:hover {
    color: var(--accent-blue);
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 300;
}

.toast {
    padding: 12px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.success {
    border-color: rgba(97, 216, 155, 0.3);
}

.toast.error {
    border-color: rgba(245, 101, 101, 0.3);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        padding: 32px 0 24px;
    }

    .page-title {
        font-size: 28px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .topbar-nav {
        display: none;
    }

    .stats-mini {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .topbar-inner {
        padding: 0 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .filter-tabs {
        gap: 2px;
    }

    .filter-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

/* ============ PAGE TRANSITION ============ */
body {
    /* animation: pageFadeIn 0.4s ease-out; removed to fix bfcache blank screen bug */
}

.main-content {
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ MICRO-ANIMATIONS ============ */

/* Card hover: scale + glow */
.game-card {
    transition: transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Button pulse on hover */
.btn-login {
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-login:hover::after {
    opacity: 1;
}

/* Filter tab hover animation */
.filter-tab {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tab:hover {
    transform: translateY(-1px);
}

/* Nav link underline animation */
.nav-item {
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 14px;
    right: 14px;
    height: 1px;
    background: var(--text-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    transform: scaleX(1);
}

/* Image zoom in cards */
.game-card-image {
    overflow: hidden;
}

.game-card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-card-image img {
    transform: scale(1.06);
}

/* ============ HAMBURGER MENU ============ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 7px;
    transition: all var(--transition-fast);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ============ MOBILE MENU ============ */
.mobile-menu {
    display: none !important;
    flex-direction: column;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-default);
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-nav-item {
    display: block;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-default);
    transition: all var(--transition-fast);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding-left: 32px;
}

/* ============ RESPONSIVE - Hamburger show ============ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: flex !important;
    }

    /* topbar-nav hidden on mobile (desktop nav) */
    .topbar-nav {
        display: none;
    }
}

/* ==========================================================================
   REDDIT LAYOUT SYSTEM
   ========================================================================== */

.reddit-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    max-width: 1248px;
    margin: 20px auto 40px;
    padding: 0 24px;
}

@media (min-width: 1024px) {
    .reddit-layout {
        grid-template-columns: 240px 1fr 312px;
    }
}

@media (max-width: 768px) {
    .reddit-layout {
        grid-template-columns: 1fr;
        padding: 0 16px;
        margin: 10px auto 20px;
    }
}

/* Sidebar Left */
.reddit-sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 77px;
    height: fit-content;
}

@media (max-width: 768px) {
    .reddit-sidebar-left {
        display: none;
    }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 9999px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

button.sidebar-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

.sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
    font-weight: 600;
}

.sidebar-item svg {
    width: 20px;
    height: 20px;
    color: inherit;
    fill: currentColor;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-default);
    margin: 8px 0;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 16px 4px;
}

.sidebar-icon-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.sidebar-item.sub-item {
    padding-left: 24px;
}

/* Sidebar Right */
.reddit-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 77px;
    height: fit-content;
}

@media (max-width: 1024px) {
    .reddit-sidebar-right {
        display: none;
    }
}

.sidebar-widget {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
    padding: 16px;
}

.widget-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--sidebar-title-color, var(--text-tertiary));
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.widget-content {
    font-size: 14px;
    color: var(--sidebar-text-color, var(--text-secondary));
    line-height: 1.5;
}

.stats-widget {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-num {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--card-meta-color, var(--text-primary));
}

.stat-desc {
    font-size: 12px;
    color: var(--sidebar-text-color, var(--text-tertiary));
}

.sidebar-footer {
    font-size: 12px;
    color: var(--text-tertiary);
    padding: 0 16px;
    line-height: 1.5;
}

.sidebar-footer a {
    color: inherit;
    text-decoration: none;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

/* Center Feed Layout */
.reddit-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Feed Filter Bar */
.feed-filter-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: transparent;
    border: none;
    padding: 8px 0;
    margin-bottom: 8px;
}

.feed-filter-bar .filter-tabs {
    display: flex;
    gap: 8px;
}

.feed-filter-bar .filter-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.feed-filter-bar .filter-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.feed-filter-bar .filter-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.feed-filter-bar .sort-select {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.feed-filter-bar .sort-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* Topbar search & layout alignment */
.topbar-inner {
    display: grid !important;
    grid-template-columns: 240px 1fr 240px;
    gap: 16px !important;
    max-width: 100% !important;
    padding: 0 24px !important;
}

@media (max-width: 768px) {
    .topbar-inner {
        grid-template-columns: auto 1fr auto;
        padding: 0 16px !important;
    }

    .topbar-center {
        display: none !important;
    }
}

.topbar-left {
    display: flex;
    align-items: center;
}

.topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.topbar-center .search-wrapper {
    position: relative;
    width: 100%;
    max-width: 560px;
}

.topbar-center .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.topbar-center .search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 9999px;
    color: var(--input-text-color, var(--text-primary));
    font-size: 13px;
    font-family: var(--font-sans);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.topbar-center .search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.topbar-center .search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    background: var(--bg-hover);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-tertiary);
}

.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ==========================================================================
   REDDIT POST ROW (index feed)
   ========================================================================== */

.feed-posts {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
}

/* Toggle Switch - Modern */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-disabled);
    transition: .2s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    transition: .2s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--accent-blue);
}

input:checked+.slider:before {
    transform: translateX(18px);
}

.rpost-row {
    display: flex;
    gap: 0;
    padding: 8px 8px 0;
    border-bottom: 1px solid var(--border-default);
    cursor: pointer;
    transition: background 0.1s;
    background: var(--bg-surface);
}

.rpost-row:last-child {
    border-bottom: none;
}

.rpost-row:hover {
    background: var(--bg-elevated);
}

/* Vote column */
.rpost-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    min-width: 36px;
}

.rpost-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: color 0.1s, background 0.1s;
    padding: 0;
}

.rpost-vote-btn:hover {
    color: var(--color-upvote);
    background: var(--bg-elevated);
}

.rpost-vote-btn.downvote:hover {
    color: var(--color-downvote);
}

.rpost-vote-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--card-meta-color);
    text-align: center;
}

/* Content area */
.rpost-content {
    flex: 1;
    min-width: 0;
    padding: 6px 8px 0;
}

.rpost-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.rpost-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.rpost-community {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 12px;
}

.rpost-community:hover {
    text-decoration: underline;
}

.rpost-dot {
    color: var(--text-secondary);
    font-size: 10px;
}

.rpost-time,
.rpost-dev {
    color: var(--text-secondary);
}

.rpost-badge {
    background: var(--accent-orange-dim);
    color: var(--accent-orange);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
    margin-left: 4px;
}

.rpost-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--title-topbar);
    margin: 0 0 6px;
    line-height: 1.3;
}

.rpost-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rpost-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.rpost-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 9999px;
    color: var(--text-secondary);
}

/* Action bar */
.rpost-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0 6px;
    border-top: 1px solid var(--border-default);
    margin-top: 6px;
}

.rpost-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.5s;
    font-family: var(--font-sans);
}

.rpost-action:hover {
    background: var(--border-hover);
    color: var(--text-primary);
}

.rpost-action.rpost-join {
    background: var(--accent-blue);
    color: #fff;
    margin-left: auto;
}

.rpost-action.rpost-join:hover {
    filter: brightness(1.1);
    background: var(--accent-blue);
    color: #fff;
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.detail-hero {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-topbar);
    width: 100%;
}

.detail-header {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-image {
    flex: 1;
    min-width: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-topbar);
}

.detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    flex: 1.2;
    min-width: 300px;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.breadcrumb a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-tertiary);
}

.detail-title {
    font-size: 40px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
}

.detail-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.detail-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-action {
    padding: 12px 28px;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.btn-primary-action {
    background: var(--accent-blue);
    color: var(--btn-text-color, #fff);
}

.btn-primary-action:hover {
    filter: brightness(1.1);
}

.btn-outline-action {
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
}

.btn-outline-action:hover {
    background: var(--bg-hover);
}

.btn-success-action {
    background: var(--color-upvote, #61d89b);
    color: #101010;
}

.btn-success-action:hover {
    filter: brightness(1.1);
}

.game-meta-list {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-mono);
}

.features-section {
    padding: 60px 0;
}

.feature-card {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-hover);
}

.feature-title {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--card-title-color);
    font-weight: 600;
}

.feature-desc {
    font-size: 14px;
    color: var(--card-desc-color);
    line-height: 1.5;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-topbar);
    border-radius: 20px;
    font-size: 12px;
    color: var(--card-meta-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.section-title {
    color: var(--text-primary);
    margin-bottom: 8px;
    margin-top: 12px;
}

/* ============================================================
   CYBERPUNK THEME — TARGETED FIXES
   Siyah topbar/modal üstünde görünmez kalan elementler
   ============================================================ */

/* Kayıt Ol butonu: siyah topbar üstünde siyah yazı = görünmez */
[data-theme="cyber"] .btn-signup {
    border-color: var(--title-topbar) !important;
    color: var(--title-topbar) !important;
}

[data-theme="cyber"] .btn-signup:hover {
    background: rgba(252, 238, 10, 0.12) !important;
}

/* Topbar logo parantezleri: #555 çok soluk siyah üstünde */
[data-theme="cyber"] .logo-bracket {
    color: var(--title-topbar) !important;
    opacity: 0.7;
}

/* Modal header: siyah bg üstüne siyah --text-primary = görünmez */
[data-theme="cyber"] .custom-modal-header h2,
[data-theme="cyber"] .custom-modal-header>h2 {
    color: var(--sidebar-text-color) !important;
}

/* Modal gövdesindeki span yazılar: "Bildirim Sesleri", "Tema Seçimi" */
[data-theme="cyber"] .custom-modal-body span,
[data-theme="cyber"] .custom-modal-body label:not(.switch) span,
[data-theme="cyber"] .custom-modal-body>div>div>div>span {
    color: var(--sidebar-text-color) !important;
}

/* Modal kapat butonu: #555 soluk siyah bg üstünde */
[data-theme="cyber"] .close-settings-btn,
[data-theme="cyber"] .custom-modal-close {
    color: var(--sidebar-text-color) !important;
}

[data-theme="cyber"] .close-settings-btn:hover,
[data-theme="cyber"] .custom-modal-close:hover {
    color: var(--title-topbar) !important;
}

/* Tema kart isimleri: koyu kart bg üstünde #555 = neredeyse görünmez */
[data-theme="cyber"] .theme-card-name {
    color: var(--sidebar-text-color) !important;
}

[data-theme="cyber"] input[type="radio"]:checked~.theme-card-name {
    color: var(--title-topbar) !important;
}

/* Blog rpost-join butonu: btn-text-color kullanmalı */
[data-theme="cyber"] .rpost-action.rpost-join {
    color: var(--btn-text-color) !important;
}

/* Filter tabs sıralama hover'da text-primary = siyah, ama bg de siyaha yakın */
[data-theme="cyber"] .rpost-action:hover {
    color: var(--sidebar-text-color) !important;
}

/* Topbar nav items: aktifken --accent-orange (kırmızı) uygun */
[data-theme="cyber"] .nav-item {
    color: var(--title-topbar);
    opacity: 0.8;
}

/* Arama kutusu sınırları ve ikonları koyu modda kaybolmasın */
[data-theme="cyber"] .topbar-center .search-input {
    border-color: var(--border-topbar) !important;
}

[data-theme="cyber"] .topbar-center .search-icon,
[data-theme="cyber"] .topbar-center .search-shortcut {
    color: var(--title-topbar) !important;
    opacity: 0.6;
}

/* Sidebar ve Topbar Border Görünürlüğü */
[data-theme="cyber"] .topbar {
    border-bottom: 2px solid var(--border-topbar) !important;
}

[data-theme="cyber"] .sidebar-item {
    color: var(--text-primary);
}

[data-theme="cyber"] .sidebar-item:hover,
[data-theme="cyber"] .sidebar-item.active {
    background: #000000 !important;
    color: var(--title-topbar) !important;
}

[data-theme="cyber"] .nav-item:hover {
    color: var(--title-topbar);
    background: rgba(252, 238, 10, 0.1);
}

[data-theme="cyber"] .nav-item.active {
    color: var(--title-topbar);
    background: rgba(252, 238, 10, 0.15);
}