/* ============================================
   TorrentVault - Main Stylesheet
   Modern dark theme with purple/blue accents
   ============================================ */

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

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Background colors */
    --bg-primary: #0a0b14;
    --bg-secondary: #0f1019;
    --bg-card: #161826;
    --bg-card-hover: #1c1f33;
    --bg-elevated: #1e2035;
    --bg-input: #161826;
    --bg-overlay: rgba(10, 11, 20, 0.85);

    /* Border */
    --border: #22253a;
    --border-light: #2a2d45;
    --border-hover: #3d4163;

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #5e6687;
    --text-inverse: #0a0b14;

    /* Accent colors */
    --accent: #7c3aed;
    --accent-light: #8b5cf6;
    --accent-dark: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.25);
    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --blue-glow: rgba(59, 130, 246, 0.2);
    --green: #10b981;
    --green-light: #34d399;
    --red: #ef4444;
    --red-light: #f87171;
    --yellow: #f59e0b;
    --orange: #f97316;
    --pink: #ec4899;
    --cyan: #06b6d4;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed, #3b82f6);
    --gradient-warm: linear-gradient(135deg, #f97316, #ef4444);
    --gradient-cool: linear-gradient(135deg, #06b6d4, #3b82f6);
    --gradient-glow: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(59,130,246,0.1));

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --container: 1280px;
    --sidebar-width: 320px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-input: #f1f5f9;
    --bg-overlay: rgba(241, 245, 249, 0.9);
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --border-hover: #94a3b8;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(124,58,237,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59,130,246,0.04) 0%, transparent 50%);
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--blue-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol { list-style: none; }

/* ============================================
   Container & Layout
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 2rem;
    padding: 2rem 0;
}

.main-content { min-width: 0; }

.sidebar {
    position: sticky;
    top: 5.5rem;
    height: fit-content;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 1.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand img {
    height: 32px;
    width: auto;
}

/* Search bar in nav */
.nav-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
}

.nav-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-elevated);
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.nav-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.nav-search-results.active { display: block; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover { background: var(--bg-card-hover); }

.search-result-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.search-result-item .result-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.search-result-item .result-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-links a.active {
    color: var(--accent-light);
    background: rgba(124,58,237,0.1);
}

/* Theme toggle */
.theme-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

/* User menu */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.nav-user-btn:hover { border-color: var(--accent); }

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* Mobile menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.3rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--accent-glow);
    color: white;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: var(--red-light);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.btn-download {
    background: var(--gradient-primary);
    color: white;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--accent-glow);
    width: 100%;
    justify-content: center;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(124, 58, 237, 0.4);
    color: white;
}

.btn-download.magnet {
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
}

.btn-download.magnet:hover {
    box-shadow: 0 8px 35px rgba(249, 115, 22, 0.4);
}

.btn-download.direct {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.btn-download.direct:hover {
    box-shadow: 0 8px 35px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.65rem;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-light);
    border: 1px solid rgba(124,58,237,0.3);
}

.card-image .card-featured {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--gradient-warm);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.card-body {
    padding: 1.15rem;
}

.card-body h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body h3 a {
    color: var(--text-primary);
}

.card-body h3 a:hover { color: var(--accent-light); }

.card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* List style card */
.card-list {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
}

.card-list .card-image {
    width: 120px;
    min-width: 120px;
    aspect-ratio: 1;
    border-radius: var(--radius);
}

.card-list .card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-header .view-all {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-light);
}

.section-header .view-all:hover { color: var(--blue-light); }

.section { margin-bottom: 2.5rem; }

/* ============================================
   Hero / Search Section
   ============================================ */
.hero {
    text-align: center;
    padding: 3.5rem 0 2.5rem;
    position: relative;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
}

.hero-search input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.hero-search input::placeholder { color: var(--text-muted); }

.hero-search .search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hero-search .search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================
   Category Pills
   ============================================ */
.category-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.25rem;
}

.category-pill {
    padding: 0.35rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.category-pill:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(124,58,237,0.08);
}

.category-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ============================================
   Sidebar Widgets
   ============================================ */
.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.widget-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    transition: all var(--transition-fast);
    padding: 0.35rem 0;
}

.widget-list-item:hover { color: var(--accent-light); }

.widget-list-item .rank {
    width: 24px;
    height: 24px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.widget-list-item:nth-child(1) .rank { background: rgba(124,58,237,0.2); color: var(--accent-light); }
.widget-list-item:nth-child(2) .rank { background: rgba(59,130,246,0.2); color: var(--blue-light); }
.widget-list-item:nth-child(3) .rank { background: rgba(16,185,129,0.2); color: var(--green-light); }

.widget-list-item img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.widget-list-item .item-info { min-width: 0; }
.widget-list-item .item-info h4 {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-list-item .item-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Categories widget */
.widget-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.widget-categories a:last-child { border-bottom: none; }
.widget-categories a:hover { color: var(--accent-light); padding-left: 0.5rem; }

.widget-categories .count {
    background: var(--bg-elevated);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   Post Page Specific
   ============================================ */
.post-header {
    margin-bottom: 1.5rem;
}

.post-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.post-featured-image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.post-content p { margin-bottom: 1rem; }
.post-content h2 { font-size: 1.3rem; color: var(--text-primary); margin: 1.5rem 0 0.75rem; }
.post-content h3 { font-size: 1.1rem; color: var(--text-primary); margin: 1.25rem 0 0.5rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content li { margin-bottom: 0.3rem; list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content img { border-radius: var(--radius); margin: 1rem 0; }
.post-content a { color: var(--accent-light); text-decoration: underline; }

/* Info table */
.info-table {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.info-table table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 0.75rem 1.15rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.info-table tr:last-child td { border-bottom: none; }

.info-table td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    width: 35%;
    white-space: nowrap;
}

.info-table td:last-child {
    color: var(--text-primary);
}

/* Download section */
.download-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.download-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Screenshot gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.screenshot-item {
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.screenshot-item:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.25rem 0.7rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}

.share-btn.facebook:hover { color: #1877f2; border-color: #1877f2; }
.share-btn.twitter:hover { color: #1da1f2; border-color: #1da1f2; }
.share-btn.telegram:hover { color: #0088cc; border-color: #0088cc; }
.share-btn.reddit:hover { color: #ff4500; border-color: #ff4500; }

/* ============================================
   Comments
   ============================================ */
.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.comment-form {
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-form input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}

.comment-form input:focus { border-color: var(--accent); }

.comment-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

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

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
}

.comment-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination ul {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination-link:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.pagination-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pagination-dots {
    color: var(--text-muted);
    padding: 0 0.3rem;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    margin-bottom: 1.25rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    color: var(--text-muted);
    margin-left: 0.15rem;
}

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

.breadcrumbs a:hover { color: var(--accent-light); }

/* ============================================
   Forms (General)
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--green-light);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red-light);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--yellow);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-light);
}

/* ============================================
   Sorting / Filters Bar
   ============================================ */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sort-options {
    display: flex;
    gap: 0.35rem;
}

.sort-options a {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.sort-options a:hover { border-color: var(--accent); color: var(--accent-light); }
.sort-options a.active { background: var(--accent); border-color: var(--accent); color: white; }

.results-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-about h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    transition: all var(--transition-fast);
}

.footer-col a:hover { color: var(--accent-light); padding-left: 0.3rem; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   Ad Slots
   ============================================ */
.ad-slot {
    margin: 1rem 0;
    text-align: center;
    min-height: 10px;
}

.ad-slot.ad-sticky {
    position: sticky;
    bottom: 0;
    z-index: 50;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Report Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.modal h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-more {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card-hover) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.auth-card h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.auth-card .form-group { margin-bottom: 1rem; }

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   Static Pages
   ============================================ */
.static-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.static-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.static-page .content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.static-page .content h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.static-page .content p {
    margin-bottom: 1rem;
}

/* ============================================
   404 Page
   ============================================ */
.page-404 {
    text-align: center;
    padding: 5rem 2rem;
}

.page-404 .error-code {
    font-size: 8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.page-404 h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-404 p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-inner { height: 56px; }
    
    .nav-links { display: none; }
    
    .mobile-toggle { display: block; }
    
    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 0.75rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-search {
        display: none;
    }
    
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.9rem; }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .post-header h1 { font-size: 1.4rem; }
    
    .info-table td:first-child { width: 40%; }
    
    .screenshot-gallery {
        grid-template-columns: 1fr 1fr;
    }
    
    .comment-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .sort-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-options {
        overflow-x: auto;
        padding-bottom: 0.3rem;
    }
    
    .static-page { padding: 0 1rem; }
    .page-404 .error-code { font-size: 5rem; }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .category-pills { justify-content: flex-start; }
    
    .share-buttons { justify-content: center; }
    
    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 1.5rem; }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.slide-down {
    animation: slideDown 0.3s ease forwards;
}

/* Lazy load images */
img.lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img.lazy.loaded {
    opacity: 1;
}
