/* ===== ANIME NEWS - PREMIUM DESIGN SYSTEM ===== */

/* CSS Variables */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --card-bg: linear-gradient(145deg, #15151f 0%, #1a1a28 100%);
    --card-hover-bg: linear-gradient(145deg, #1a1a28 0%, #202032 100%);

    /* Accent Colors - Anime Inspired */
    --accent-primary: #ff6b9d;
    --accent-secondary: #c44dff;
    --accent-tertiary: #4de1ff;
    --accent-gradient: linear-gradient(135deg, #ff6b9d 0%, #c44dff 50%, #4de1ff 100%);
    --accent-glow: 0 0 30px rgba(255, 107, 157, 0.3);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b4b4c4;
    --text-muted: #6b6b7a;

    /* Border */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 107, 157, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(255, 107, 157, 0.15);

    /* Category Colors */
    --cat-anime: #ff6b9d;
    --cat-manga: #c44dff;
    --cat-news: #4de1ff;
    --cat-review: #ffb84d;
    --cat-cosplay: #4dff91;
    --cat-game: #ff4d4d;

    /* Sizes */
    --container-width: 1400px;
    --header-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f5;
    --card-bg: linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
    --card-hover-bg: linear-gradient(145deg, #f5f7fa 0%, #eef0f5 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5e;
    --text-muted: #8a8a9e;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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;
}

/* Background Particles Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 157, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(196, 77, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(77, 225, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== BREAKING NEWS TICKER ===== */
.breaking-news {
    background: var(--accent-gradient);
    padding: 12px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.breaking-label {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 6px 16px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-left: 24px;
    border-radius: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
    margin-left: 20px;
}

.ticker {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    padding: 0 50px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===== HEADER ===== */
.header {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 24px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--accent-glow);
}

.logo-icon i {
    color: white;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 8px;
}

.nav-list li a {
    padding: 10px 18px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    position: relative;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--text-primary);
    background: rgba(255, 107, 157, 0.1);
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 60%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 4px 4px 4px 16px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 160px;
    font-size: 0.9rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.search-box button:hover {
    transform: scale(1.05);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-list li a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.mobile-nav-list li a:hover {
    color: var(--accent-primary);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 60px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.hero-main {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.hero-overlay .category-badge {
    margin-bottom: 16px;
}

.hero-overlay h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    color: white;
}

.hero-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-sidebar-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
}

.hero-sidebar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-sidebar-item:hover img {
    transform: scale(1.05);
}

.hero-sidebar-item .hero-overlay {
    padding: 20px;
}

.hero-sidebar-item .hero-overlay h3 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.anime {
    background: rgba(255, 107, 157, 0.2);
    color: var(--cat-anime);
    border: 1px solid rgba(255, 107, 157, 0.3);
}

.category-badge.manga {
    background: rgba(196, 77, 255, 0.2);
    color: var(--cat-manga);
    border: 1px solid rgba(196, 77, 255, 0.3);
}

.category-badge.news {
    background: rgba(77, 225, 255, 0.2);
    color: var(--cat-news);
    border: 1px solid rgba(77, 225, 255, 0.3);
}

.category-badge.review {
    background: rgba(255, 184, 77, 0.2);
    color: var(--cat-review);
    border: 1px solid rgba(255, 184, 77, 0.3);
}

.category-badge.cosplay {
    background: rgba(77, 255, 145, 0.2);
    color: var(--cat-cosplay);
    border: 1px solid rgba(77, 255, 145, 0.3);
}

.category-badge.game {
    background: rgba(255, 77, 77, 0.2);
    color: var(--cat-game);
    border: 1px solid rgba(255, 77, 77, 0.3);
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.section-title i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.view-all:hover {
    gap: 12px;
}

/* ===== NEWS CARDS ===== */
.news-section {
    padding: 40px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-glow);
}

.news-card:hover::before {
    opacity: 1;
}

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.08);
}

.card-image .category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    backdrop-filter: blur(10px);
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content h3 a:hover {
    color: var(--accent-primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta i {
    font-size: 0.8rem;
    color: var(--accent-primary);
}

/* ===== FEATURED SECTION ===== */
.featured-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.featured-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateX(8px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md);
}

.featured-card .card-image {
    border-radius: var(--border-radius-sm);
    aspect-ratio: 1;
}

.featured-card .card-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== SIDEBAR ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-widget {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-primary);
}

.widget-title i {
    color: var(--accent-primary);
}

/* Popular Posts */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.popular-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 32px;
}

.popular-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-content h4 a:hover {
    color: var(--accent-primary);
}

.popular-content span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.newsletter-form input {
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--accent-primary);
}

.newsletter-form button {
    padding: 14px 24px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--accent-glow);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-about p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links ul li a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-primary);
    padding-left: 8px;
}

.footer-links ul li a:hover::before {
    opacity: 1;
}

.footer-contact p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--accent-primary);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-sidebar {
        flex-direction: row;
    }

    .hero-sidebar-item {
        flex: 1;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-sidebar {
        flex-direction: column;
    }

    .hero-overlay h2 {
        font-size: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card .card-image {
        aspect-ratio: 16/9;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .search-box {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .breaking-label {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-left: 16px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .hero-overlay {
        padding: 24px;
    }

    .hero-overlay h2 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .card-content {
        padding: 20px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:nth-child(2) {
    animation-delay: 0.1s;
}

.news-card:nth-child(3) {
    animation-delay: 0.2s;
}

.news-card:nth-child(4) {
    animation-delay: 0.3s;
}

.news-card:nth-child(5) {
    animation-delay: 0.4s;
}

.news-card:nth-child(6) {
    animation-delay: 0.5s;
}

/* Glow Effect for Cards */
.news-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            rgba(255, 107, 157, 0.1),
            transparent 30%);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotate 4s linear infinite;
    pointer-events: none;
}

.news-card:hover::after {
    opacity: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===== CATEGORY PAGES ===== */

/* Category Hero */
.category-hero {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    z-index: 0;
}

.category-hero.anime::before {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), transparent 70%);
}

.category-hero.manga::before {
    background: linear-gradient(135deg, rgba(196, 77, 255, 0.2), transparent 70%);
}

.category-hero.news::before {
    background: linear-gradient(135deg, rgba(77, 225, 255, 0.2), transparent 70%);
}

.category-hero.review::before {
    background: linear-gradient(135deg, rgba(255, 184, 77, 0.2), transparent 70%);
}

.category-hero.cosplay::before {
    background: linear-gradient(135deg, rgba(77, 255, 145, 0.2), transparent 70%);
}

.category-hero.game::before {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.2), transparent 70%);
}

.category-hero-content {
    position: relative;
    z-index: 1;
}

.category-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-hero-content h1 i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-hero-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Sub Navigation Tabs */
.sub-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    z-index: 99;
}

.sub-nav-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.sub-nav-tabs::-webkit-scrollbar {
    display: none;
}

.sub-nav-tabs a {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sub-nav-tabs a:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.sub-nav-tabs a.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Category Main Content */
.category-main {
    padding: 40px 0;
}

.category-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.articles-section {
    min-height: 400px;
}

/* Sort Options */
.sort-options {
    display: flex;
    gap: 12px;
}

.sort-options select {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-options select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-num:hover,
.page-num.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.loading-spinner i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.loading-spinner p {
    font-size: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    grid-column: 1 / -1;
    font-size: 1.1rem;
}

/* Responsive for Category Pages */
@media (max-width: 1024px) {
    .category-content {
        grid-template-columns: 1fr;
    }

    .category-hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 40px 0;
    }

    .category-hero-content h1 {
        font-size: 1.6rem;
    }

    .sub-nav-tabs {
        padding: 12px 0;
    }

    .sub-nav-tabs a {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* ===== INLINE TABS (Horizontal Navigation in Section Header) ===== */

.section-header-with-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.section-header-with-tabs h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.section-header-with-tabs h2 i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.inline-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.tab-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.section-header-with-tabs .sort-options {
    margin-left: auto;
}

@media (max-width: 1024px) {
    .section-header-with-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .inline-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .section-header-with-tabs .sort-options {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .section-header-with-tabs h2 {
        font-size: 1.2rem;
    }

    .tab-btn {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}