@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-dark: #0a0a1a;
    --primary-darker: #050510;
    --surface: #12122a;
    --surface-light: #1a1a3e;
    --surface-hover: #222250;
    --surface-card: rgba(18, 18, 42, 0.75);
    --accent-gold: #d4a853;
    --accent-gold-light: #e8c878;
    --accent-gold-hover: #c9952e;
    --accent-gold-glow: rgba(212, 168, 83, 0.15);
    --accent-gold-subtle: rgba(212, 168, 83, 0.08);
    --text-light: #f0f0f5;
    --text-secondary: #b8b8cc;
    --text-muted: #9494ad;
    --text-dim: #8888a0;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --hot: #ff6b35;
    --hot-bg: rgba(255, 107, 53, 0.12);
    --glass: rgba(18, 18, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 20px rgba(212, 168, 83, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ========== HEADER ========== */
.site-header {
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo img {
    height: 34px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(212, 168, 83, 0.3));
}

.logo-text {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.logo-badge {
    font-size: 9px;
    font-weight: 700;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 1px;
    line-height: 1;
    margin-top: -8px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link svg { opacity: 0.6; }
.nav-link:hover { color: var(--text-light); background: rgba(255,255,255,0.04); }
.nav-link:hover svg { opacity: 1; }
.nav-link.active { color: var(--accent-gold); background: var(--accent-gold-subtle); }
.nav-link.active svg { opacity: 1; color: var(--accent-gold); }

.btn {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
    color: var(--primary-dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(212, 168, 83, 0.25);
}

.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; justify-content: center; padding: 12px 24px; font-size: 14px; }

/* ========== STATS BAR ========== */
.stats-bar {
    background: rgba(10, 10, 26, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 0;
    font-size: 12px;
    color: var(--text-muted);
    overflow-x: auto;
}

.stats-bar-inner {
    display: flex;
    align-items: center;
    gap: 0;
    height: 38px;
    white-space: nowrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    font-weight: 500;
}

.stat-item svg { opacity: 0.5; }

.stat-num {
    color: var(--text-light);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-item.today { color: var(--accent-gold); }
.stat-item.today .stat-num { color: var(--accent-gold-light); }
.stat-item.today svg { opacity: 0.8; color: var(--accent-gold); }

.stat-item.pending-stat { color: #fbbf24; }
.stat-item.pending-stat .stat-num { color: #fbbf24; }

.stat-item.stat-live {
    margin-left: auto;
    color: var(--success);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 16px;
    background: var(--border-light);
    flex-shrink: 0;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0); }
}

/* ========== MAIN CONTENT ========== */
.main-content {
    position: relative;
    min-height: calc(100vh - 200px);
    padding: 0 0 60px;
}

.main-content::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../../background.jpg') no-repeat center center;
    background-size: cover;
    z-index: -2;
}

.background-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg,
        rgba(10, 10, 26, 0.96) 0%,
        rgba(10, 10, 26, 0.90) 40%,
        rgba(10, 10, 26, 0.96) 100%
    );
    z-index: -1;
}

/* ========== CATEGORY PILLS ========== */
.category-pills-wrapper {
    padding: 20px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.category-pills-wrapper::-webkit-scrollbar { display: none; }

.category-pills-wrapper::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--primary-dark));
    pointer-events: none;
    flex-shrink: 0;
    display: none;
}

@media (max-width: 768px) {
    .category-pills-wrapper::after { display: block; }
}

.category-pills {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}

.cat-pill svg { opacity: 0.5; }

.cat-pill:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
    background: var(--surface-light);
}

.cat-pill.active {
    background: var(--accent-gold-glow);
    border-color: rgba(212, 168, 83, 0.25);
    color: var(--accent-gold-light);
}

.cat-pill.active svg { opacity: 1; color: var(--accent-gold); }

.pill-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
}

.cat-pill.active .pill-count {
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent-gold);
}

/* ========== MAIN LAYOUT ========== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-top: 20px;
    align-items: start;
}

/* ========== SORT BAR ========== */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
}

.sort-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.sort-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.sort-tab svg { opacity: 0.5; }
.sort-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.sort-tab.active { color: var(--text-light); background: var(--surface-light); }
.sort-tab.active svg { opacity: 1; }

.results-info {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}

/* ========== FEED CARDS ========== */
.cards-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-card {
    display: flex;
    gap: 0;
    background: var(--surface-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    animation: cardEnter 0.35s ease forwards;
}

.feed-card:nth-child(1) { animation-delay: 0.02s; }
.feed-card:nth-child(2) { animation-delay: 0.05s; }
.feed-card:nth-child(3) { animation-delay: 0.08s; }
.feed-card:nth-child(4) { animation-delay: 0.11s; }
.feed-card:nth-child(5) { animation-delay: 0.14s; }
.feed-card:nth-child(6) { animation-delay: 0.17s; }
.feed-card:nth-child(7) { animation-delay: 0.20s; }
.feed-card:nth-child(8) { animation-delay: 0.23s; }
.feed-card:nth-child(9) { animation-delay: 0.26s; }

@keyframes cardEnter {
    to { opacity: 1; transform: translateY(0); }
}

.feed-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(18, 18, 42, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feed-card.hot {
    border-color: rgba(255, 107, 53, 0.15);
}

.feed-card.hot:hover {
    border-color: rgba(255, 107, 53, 0.25);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.05);
}

/* VOTE COLUMN */
.vote-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 16px 6px 16px 14px;
    min-width: 58px;
}

.vote-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    width: 34px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    position: relative;
}

.vote-btn:hover:not(.active):not(:disabled) {
    color: var(--accent-gold);
    background: var(--accent-gold-subtle);
}

.vote-btn.upvote.active {
    color: var(--success);
    background: var(--success-bg);
}

.vote-btn.downvote.active {
    color: var(--danger);
    background: var(--danger-bg);
}

.vote-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@keyframes votePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.vote-btn.pulse svg { animation: votePulse 0.25s ease; }

.vote-count {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    text-align: center;
    min-width: 30px;
    line-height: 1;
    padding: 2px 0;
}

.vote-count.positive { color: var(--success); }
.vote-count.negative { color: var(--danger); }

/* CARD CONTENT */
.feed-card-content {
    flex: 1;
    padding: 16px 18px 16px 8px;
    min-width: 0;
}

.feed-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.badge {
    background: var(--accent-gold-subtle);
    color: var(--accent-gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid rgba(212, 168, 83, 0.12);
}

.badge-hot {
    background: var(--hot-bg);
    color: var(--hot);
    border-color: rgba(255, 107, 53, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.feed-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.feed-author svg { opacity: 0.5; }

.feed-time {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
    margin-left: auto;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-dim);
}

.detail-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent-gold);
    font-weight: 600;
}

.detail-author svg { opacity: 0.6; }

.feed-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.feed-card-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.feed-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.vote-detail {
    display: flex;
    gap: 12px;
}

.vd-up, .vd-down {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
}

.vd-up { color: var(--success); }
.vd-down { color: var(--danger); }
.vd-up svg, .vd-down svg { opacity: 0.7; }

.feed-date {
    font-size: 11px;
    color: var(--text-dim);
}

/* ========== SIDEBAR ========== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 120px;
}

.sidebar-card {
    background: var(--surface-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sidebar-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h3 svg {
    color: var(--accent-gold);
    opacity: 0.7;
}

/* TRENDING */
.trending-list {
    padding: 6px 0;
}

.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 18px;
    transition: background 0.15s;
    cursor: default;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.trending-rank {
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 1px;
}

.trending-rank.top {
    background: var(--accent-gold-glow);
    color: var(--accent-gold);
}

.trending-info {
    flex: 1;
    min-width: 0;
}

.trending-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    line-height: 1.35;
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.trending-cat {
    font-size: 10.5px;
    color: var(--text-dim);
    font-weight: 500;
}

.trending-votes {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.trending-votes.pos { color: var(--success); }
.trending-votes.pos svg { color: var(--success); }

/* ACTIVITY */
.activity-list {
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
}

.activity-list::-webkit-scrollbar { width: 4px; }
.activity-list::-webkit-scrollbar-thumb { background: var(--surface-light); border-radius: 2px; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 18px;
}

.activity-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.activity-icon.up {
    background: var(--success-bg);
    color: var(--success);
}

.activity-icon.down {
    background: var(--danger-bg);
    color: var(--danger);
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 10.5px;
    color: var(--text-dim);
    font-weight: 500;
}

/* CATEGORY STATS */
.cat-stats-list {
    padding: 8px 12px 12px;
}

.cat-stat-item {
    display: block;
    padding: 8px 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.cat-stat-item:hover { background: rgba(255,255,255,0.03); }
.cat-stat-item.active { background: var(--accent-gold-subtle); }

.cat-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.cat-stat-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cat-stat-item.active .cat-stat-name { color: var(--accent-gold-light); }

.cat-stat-count {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}

.cat-stat-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
}

.cat-stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold-hover), var(--accent-gold));
    border-radius: 2px;
    transition: width 0.5s ease;
    min-width: 3px;
}

.cat-stat-item.active .cat-stat-fill {
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
}

/* SIDEBAR INFO */
.sidebar-info {
    padding: 20px 18px;
    text-align: center;
}

.info-icon {
    color: var(--accent-gold);
    opacity: 0.5;
    margin-bottom: 10px;
}

.sidebar-info h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.sidebar-info ul {
    list-style: none;
    text-align: left;
}

.sidebar-info ul li {
    font-size: 12px;
    color: var(--text-muted);
    padding: 5px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.sidebar-info ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-gold);
    opacity: 0.4;
}

.sidebar-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
}

/* ========== EMPTY FEED ========== */
.empty-feed {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.empty-icon {
    color: var(--text-dim);
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-feed h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-feed p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--surface-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.page-btn:hover:not(.active):not(.disabled) {
    border-color: var(--border-light);
    color: var(--text-light);
    background: var(--surface-light);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
    border-color: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: var(--shadow-gold);
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-prev, .page-next {
    padding: 0;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 38px;
    color: var(--text-dim);
    font-size: 14px;
    letter-spacing: 2px;
    user-select: none;
}

.page-info {
    margin-left: 12px;
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}

@media (max-width: 768px) {
    .pagination { gap: 4px; }
    .page-btn { min-width: 34px; height: 34px; font-size: 12px; }
    .page-info { width: 100%; text-align: center; margin-left: 0; margin-top: 8px; }
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show { display: flex; animation: modalFadeIn 0.2s ease; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
    max-width: 480px;
    width: 100%;
    animation: modalSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light), var(--accent-gold));
}

@keyframes modalSlideUp {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
}

.modal-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-light); }

/* ========== FORMS ========== */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 11.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    background: var(--primary-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.form-group textarea { resize: vertical; min-height: 90px; }

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(12px);
    min-width: 260px;
}

.toast.removing { animation: toastOut 0.2s ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }

@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(100px); opacity: 0; } }

/* ========== FOOTER ========== */
.site-footer {
    background: var(--primary-darker);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    height: 30px;
    opacity: 0.5;
}

.footer-left p {
    font-size: 13px;
    color: var(--text-dim);
    max-width: 400px;
}

.footer-stats {
    display: flex;
    gap: 32px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.footer-stat {
    display: flex;
    flex-direction: column;
}

.fs-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.fs-label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-dim);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface-hover); }

/* ========== HEADER SEARCH ========== */
.header-search {
    flex: 1;
    max-width: 380px;
    position: relative;
    margin: 0 16px;
}

.header-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-light);
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}

.header-search input::placeholder { color: var(--text-dim); }
.header-search input:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 3px var(--accent-gold-glow); }

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    transition: var(--transition);
}

.search-clear:hover { color: var(--text-light); background: rgba(255,255,255,0.1); }

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 0;
    gap: 16px;
    flex-wrap: wrap;
}

.search-results-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover { color: var(--text-light); background: rgba(255,255,255,0.05); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ========== ANNOUNCEMENT BANNER ========== */
.announcement-bar {
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.announcement-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-info { background: rgba(96, 165, 250, 0.08); color: #60a5fa; }
.announcement-info svg { color: #60a5fa; }
.announcement-success { background: rgba(52, 211, 153, 0.08); color: #34d399; }
.announcement-success svg { color: #34d399; }
.announcement-warning { background: rgba(251, 191, 36, 0.08); color: #fbbf24; }
.announcement-warning svg { color: #fbbf24; }

/* ========== FILTER TOGGLE & PANEL ========== */
.sort-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.filter-toggle:hover { border-color: var(--border-light); color: var(--text-secondary); }
.filter-toggle.has-filters { border-color: var(--accent-gold); color: var(--accent-gold); }
.filter-toggle svg { opacity: 0.6; }

.filter-badge {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.4;
}

.filters-panel {
    display: none;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    animation: slideDown 0.2s ease;
}

.filters-panel.open { display: block; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filter-group label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    background: var(--primary-dark);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
    font-family: inherit;
}

.filter-group select:focus,
.filter-group input:focus { outline: none; border-color: var(--accent-gold); }

.filter-actions { display: flex; gap: 8px; align-items: flex-end; }

/* ========== ROADMAP BADGES ========== */
.badge-roadmap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-rm-planlaniyor {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.15);
}

.badge-rm-yapiliyor {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.15);
}

.badge-rm-tamamlandi {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.15);
}

.badge-replied {
    background: rgba(212, 168, 83, 0.1);
    color: var(--accent-gold);
    border-color: rgba(212, 168, 83, 0.15);
}

/* ========== EMOJI REACTIONS ========== */
.reactions-bar {
    display: flex;
    gap: 6px;
    padding: 10px 0 0;
    flex-wrap: wrap;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    color: var(--text-dim);
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-light);
    transform: scale(1.05);
}

.reaction-btn.reacted {
    background: var(--accent-gold-subtle);
    border-color: rgba(212, 168, 83, 0.2);
}

.reaction-emoji {
    font-size: 14px;
    line-height: 1;
}

.reaction-count {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 8px;
    text-align: center;
    color: var(--text-muted);
}

.reaction-btn.reacted .reaction-count {
    color: var(--accent-gold);
}

.reaction-btn.zero-count {
    opacity: 0.5;
}

.reaction-btn.zero-count .reaction-count {
    display: none;
}

@keyframes reactionPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.reaction-btn.pop .reaction-emoji {
    animation: reactionPop 0.3s ease;
}

/* ========== SIMILAR TOPICS ========== */
.similar-topics {
    margin-top: 10px;
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px;
    animation: slideDown 0.2s ease;
}

.similar-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 8px;
}

.similar-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.similar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}

.similar-item:hover {
    background: rgba(0, 0, 0, 0.25);
}

.similar-item-title {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.similar-item-votes {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
}

.similar-item-cat {
    font-size: 10px;
    color: var(--text-dim);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ========== DUYGU BADGE ========== */
.badge-duygu {
    border: none;
    padding: 2px 6px;
    font-size: 13px;
    line-height: 1;
}

.badge-duygu::before { display: none; }

.badge-duygu-olumlu { background: rgba(52, 211, 153, 0.08); }
.badge-duygu-olumsuz { background: rgba(248, 113, 113, 0.08); }

/* ========== POLL BUILDER (modal) ========== */
.poll-toggle-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: var(--transition);
    vertical-align: middle;
}

.poll-toggle-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-light); }

.poll-builder {
    margin-top: 8px;
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.poll-builder input {
    width: 100%;
    padding: 9px 12px;
    background: var(--primary-dark);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 8px;
}

.poll-builder input:focus { outline: none; border-color: var(--accent-gold); }

.poll-options { display: flex; flex-direction: column; gap: 0; }

.poll-add-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
}

.poll-add-option:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ========== POLL CARD (konu detay) ========== */
.poll-card {
    background: var(--surface-card);
    border: 1px solid rgba(96, 165, 250, 0.12);
    border-radius: var(--radius-lg);
    margin-top: 16px;
    overflow: hidden;
}

.poll-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.poll-header svg { color: #60a5fa; flex-shrink: 0; }

.poll-question {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
    flex: 1;
}

.poll-total {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}

.poll-options-list {
    padding: 12px 24px;
}

.poll-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    color: var(--text-light);
    text-align: left;
    font-size: 14px;
}

.poll-option:hover:not(.voted) {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.05);
}

.poll-option.voted {
    cursor: default;
}

.poll-option.selected {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
}

.poll-option-text {
    position: relative;
    z-index: 1;
    flex: 1;
    font-weight: 500;
}

.poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(96, 165, 250, 0.08);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.poll-option.selected .poll-option-bar {
    background: rgba(96, 165, 250, 0.15);
}

.poll-option-pct {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 700;
    color: #60a5fa;
    min-width: 40px;
    text-align: right;
}

.poll-option-count {
    position: relative;
    z-index: 1;
    font-size: 11px;
    color: var(--text-dim);
    min-width: 30px;
    text-align: right;
}

.poll-option:not(.voted) .poll-option-bar,
.poll-option:not(.voted) .poll-option-pct,
.poll-option:not(.voted) .poll-option-count {
    display: none;
}

.poll-hint {
    padding: 0 24px 14px;
    font-size: 12px;
    color: var(--text-dim);
}

/* ========== ADMIN REPLY PREVIEW (in feed) ========== */
.admin-reply-preview {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin: 8px 0 0;
    background: rgba(212, 168, 83, 0.05);
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.admin-reply-preview svg {
    flex-shrink: 0;
    color: var(--accent-gold);
    margin-top: 2px;
    opacity: 0.6;
}

/* ========== FEED CARD LINK & DETAIL ========== */
.feed-card-link {
    text-decoration: none;
    color: inherit;
}

.feed-card-link:hover .feed-card-title {
    color: var(--accent-gold-light);
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-gold);
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.detail-link:hover { opacity: 1; }

/* ========== DETAIL PAGE ========== */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding-top: 28px;
    align-items: start;
}

.detail-card {
    background: var(--surface-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.detail-top {
    display: flex;
    gap: 0;
    padding: 28px;
}

.detail-vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-right: 24px;
    margin-right: 24px;
    border-right: 1px solid var(--border);
    min-width: 70px;
}

.vote-count-big {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.vote-count-big.positive { color: var(--success); }
.vote-count-big.negative { color: var(--danger); }

.detail-content { flex: 1; min-width: 0; }

.detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.35;
    letter-spacing: -0.3px;
    margin-bottom: 16px;
}

.detail-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.detail-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.detail-vote-stats {
    display: flex;
    gap: 14px;
    margin-left: auto;
}

.dvs-up, .dvs-down {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.dvs-up { color: var(--success); }
.dvs-down { color: var(--danger); }

/* SHARE */
.share-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid var(--border);
}

.share-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover { border-color: var(--border-light); color: var(--text-light); }
.share-twitter:hover { color: #1DA1F2; border-color: rgba(29, 161, 242, 0.3); }
.share-whatsapp:hover { color: #25D366; border-color: rgba(37, 211, 102, 0.3); }
.share-copy:hover { color: var(--accent-gold); border-color: rgba(212, 168, 83, 0.3); }

/* ADMIN REPLY CARD */
.admin-reply-card {
    background: var(--surface-card);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-lg);
    margin-top: 16px;
    overflow: hidden;
}

.admin-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(212, 168, 83, 0.05);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.admin-reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-gold);
}

.admin-reply-meta {
    font-size: 12px;
    color: var(--text-dim);
}

.admin-reply-body {
    padding: 20px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* VOTE STATS DETAIL (sidebar) */
.vote-stats-detail { padding: 16px 18px; }

.vsd-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.vsd-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 60px;
}

.vsd-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
}

.vsd-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.vsd-bar-up { background: var(--success); }
.vsd-bar-down { background: var(--danger); }

.vsd-val {
    font-size: 13px;
    font-weight: 700;
    min-width: 30px;
    text-align: right;
}

.vsd-up { color: var(--success); }
.vsd-down { color: var(--danger); }

.vsd-net {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.vsd-net strong { font-size: 18px; }
.vsd-net .positive { color: var(--success); }
.vsd-net .negative { color: var(--danger); }

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .main-layout, .detail-layout {
        grid-template-columns: 1fr;
    }

    .sidebar, .detail-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-info { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 12px 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-search { order: 3; flex: none; width: 100%; max-width: none; margin: 0; }

    .header-nav { width: auto; gap: 4px; }
    .nav-link span { display: none; }
    .nav-link { padding: 8px; }

    .stats-bar-inner { gap: 0; font-size: 11px; }
    .stat-item { padding: 0 10px; }

    .sidebar, .detail-sidebar {
        grid-template-columns: 1fr;
    }

    .category-pills { padding-bottom: 8px; gap: 6px; }
    .cat-pill { padding: 7px 12px; font-size: 12px; }

    /* Feed card: vote + content */
    .vote-column { padding: 12px 4px 12px 10px; min-width: 48px; }
    .vote-btn { width: 40px; height: 40px; }
    .feed-card-content { padding: 12px 14px 12px 6px; }
    .feed-card-title { font-size: 14px; }
    .feed-card-desc { font-size: 12px; -webkit-line-clamp: 2; }
    .feed-card-meta { gap: 6px; }
    .badge { font-size: 9.5px; padding: 2px 8px; }
    .feed-time { font-size: 10px; }

    /* Reactions */
    .reactions-bar { gap: 4px; }
    .reaction-btn { padding: 4px 8px; }

    /* Sort tabs */
    .sort-bar { flex-wrap: wrap; gap: 10px; }
    .sort-tabs { width: 100%; }
    .sort-tab { flex: 1; justify-content: center; padding: 8px 8px; font-size: 11px; }
    .sort-right { width: 100%; justify-content: space-between; }
    .filters-form { flex-direction: column; }
    .filter-group { width: 100%; }

    /* Footer */
    .footer-stats { gap: 20px; flex-wrap: wrap; }
    .footer-stat { flex: 1; min-width: 80px; text-align: center; }

    /* Detail page */
    .detail-top { flex-direction: column; }
    .detail-vote-box { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); margin-right: 0; margin-bottom: 20px; padding-right: 0; padding-bottom: 16px; }
    .detail-title { font-size: 18px; }
    .share-section { flex-wrap: wrap; }

    /* Modal full width */
    .modal { padding: 12px; }
    .modal-content { padding: 22px; border-radius: var(--radius-lg); max-height: 90vh; overflow-y: auto; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .stats-bar { display: none; }

    .header-nav span { display: none; }

    /* Feed card stacked */
    .feed-card { flex-direction: column; }
    .vote-column {
        flex-direction: row;
        padding: 10px 14px;
        border-bottom: 1px solid var(--border);
        min-width: auto;
        gap: 8px;
    }
    .vote-btn { width: 36px; height: 36px; }
    .vote-count { min-width: auto; font-size: 15px; }
    .feed-card-content { padding: 12px 14px; }

    /* Footer */
    .footer-left { flex-direction: column; text-align: center; }
    .footer-stats { justify-content: center; }
    .fs-num { font-size: 20px; }

    /* Detail */
    .detail-top { padding: 20px; }
    .detail-title { font-size: 17px; }
    .share-section { padding: 14px 20px; }

    /* Modal nearly full screen */
    .modal { padding: 8px; align-items: flex-end; }
    .modal-content {
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 92vh;
        padding: 20px 18px;
    }

    /* Pagination compact */
    .page-btn { min-width: 34px; height: 38px; }
}
