/* =====================================================
   NEO-NEWS DESIGN SYSTEM | BASE STYLES
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* --- LAYOUT UTILS --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- AMBIENT GLOW --- */
.ambient-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: var(--accent-primary);
}

.glow-2 {
    bottom: -100px;
    right: -100px;
    background: var(--accent-secondary);
}

/* --- HEADER --- */
.cyber-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-accent {
    color: var(--accent-primary);
}

.desktop-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.icon-btn {
    font-size: 1.2rem;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- RIGHT ACTIONS (Desktop) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Better spacing */
}

/* --- DESKTOP SIDEBAR --- */
.desktop-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.desktop-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.desktop-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    /* Hidden */
    width: 320px;
    height: 100vh;
    background: var(--bg-surface);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-light);
    z-index: 3000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.desktop-sidebar.active {
    transform: translateX(-320px);
}

.sidebar-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-sidebar-btn {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.sidebar-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.sidebar-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-weight: 700;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-nav a {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-tags a {
    padding: 6px 12px;
    background: var(--bg-surface-hover);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.sidebar-tags a:hover {
    background: var(--accent-primary);
    color: #fff;
}

.sidebar-social {
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.sidebar-social a:hover {
    color: var(--accent-primary);
}

.sidebar-footer-msg {
    margin-top: 40px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* --- SIDEBAR SOURCES LIST --- */
.sidebar-sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-right: 0;
    max-height: none;
}

.sidebar-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-source-item:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.sidebar-source-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #fff;
    background: var(--source-color, #ccc);
    flex-shrink: 0;
}

.sidebar-source-name {
    font-size: 0.8rem;
    color: inherit;
    font-weight: 500;
}

/* --- HEADER CENTER (SEARCH) --- */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 4px 6px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    /* Centered search width */
}

.search-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
    max-width: 450px;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 15px;
    font-size: 0.95rem;
    outline: none;
    flex: 1;
}

/* --- SIDEBAR MENU STYLES --- */
.sidebar-divider {
    width: 60px;
    height: 1px;
    background: var(--border-light);
    margin: 20px 0 10px;
}

.sidebar-heading {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.weather-widget-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
    margin-right: 15px;
    font-size: 1rem;
}

.weather-widget-mini i {
    color: #FDB813;
    /* Sun color */
    font-size: 1.2rem;
}

/* --- MOBILE SPECIFIC --- */
.mobile-only-flex {
    display: none;
}

/* --- VIEW SWITCHING --- */
.view-section {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.view-section.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* --- MOBILE MENU --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateY(0);
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    padding: 10px;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-link i {
    font-size: 1.4rem;
    color: var(--accent-primary);
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--text-primary);
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.mobile-footer {
    position: absolute;
    bottom: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- SEARCH BAR --- */
.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2px;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    width: 250px;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 15px;
    font-size: 0.9rem;
    outline: none;
    width: 180px;
    /* Default width */
    transition: width 0.3s ease;
}

.search-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.search-btn:hover {
    color: var(--accent-primary);
}

@media (max-width: 768px) {
    .search-wrapper {
        margin-right: 5px;
    }

    .search-input {
        width: 120px;
        /* Smaller on mobile */
    }

    .search-wrapper:focus-within {
        width: 160px;
    }
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 30px 0 20px;
    /* Greatly Reduced padding */
    text-align: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    /* Reduced size */
    line-height: 1.1;
    margin-bottom: 8px;
    margin-top: 80px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 100px;
}

/* --- CATEGORIES (BENTO STYLE) --- */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full, 50px);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-chip:hover,
.category-chip.active {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

.category-chip.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

.cat-icon {
    font-size: 1.1rem;
}

/* --- NEWS FILTER BAR --- */
.news-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md, 12px);
    margin-bottom: 40px;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full, 50px);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.filter-tab i {
    font-size: 0.85rem;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm, 6px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.view-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* Mobile adjustments for filter bar */
@media (max-width: 768px) {
    .news-filter-bar {
        padding: 5px 10px;
        margin-bottom: 20px;
        gap: 10px;
        border: none;
        background: transparent;
        justify-content: center;
    }

    .filter-tabs {
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .filter-tab {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
        font-size: 0;
        /* Hide text */
        border-radius: 10px;
        flex-shrink: 0;
    }

    .filter-tab i {
        font-size: 1.1rem;
        margin: 0;
    }

    .view-label {
        display: none;
    }

    .view-controls {
        display: none;
        /* Hide view toggle on mobile */
    }

    .view-btn {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }
}



/* --- LIST VIEW --- */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-view .news-card {
    flex-direction: row;
    height: 220px;
    /* Fixed height for horizontal cards */
}

.list-view .card-image-wrapper {
    width: 350px;
    height: 220px;
    /* Match card height */
    padding-top: 0;
    flex-shrink: 0;
    position: relative;
    /* Ensure positioning context */
}

.list-view .card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-view .card-content {
    justify-content: center;
}

.list-view .news-title {
    font-size: 1.4rem;
}

/* Mobile adjustments for list view */
@media (max-width: 768px) {
    .list-view .news-card {
        flex-direction: column;
        height: auto;
    }

    .list-view .card-image-wrapper {
        width: 100%;
        padding-top: 60%;
    }
}

.news-section {
    padding: 5px 0;
    /* Reduced top padding */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--accent-primary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    padding-bottom: 40px;
}

/* --- NEWS CARD (REDESIGNED) --- */
.news-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 240, 255, 0.1);
    z-index: 2;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    font-size: 1.1rem;
}

.favorite-btn:hover {
    background: rgba(255, 51, 102, 0.2);
    border-color: var(--accent-secondary);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    animation: heartBeat 0.3s ease;
}

.favorite-btn.active i {
    color: #fff;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.card-image-wrapper {
    position: relative;
    padding-top: 60%;
    /* More compact 5:3 ratio */
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 51, 102, 0.1));
}

.card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-image-wrapper img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(11, 14, 20, 0.7) 100%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.news-card:hover .card-overlay {
    opacity: 0.5;
}

.source-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    letter-spacing: 0.5px;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 10px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-date i {
    color: var(--accent-secondary);
}

.news-cat {
    font-size: 1.1rem;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: var(--accent-primary);
}

.news-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    padding-top: 8px;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    gap: 10px;
    color: var(--text-primary);
}

.read-more-btn i {
    transition: transform 0.2s ease;
}

.read-more-btn:hover i {
    transform: translateX(4px);
}

/* --- LOADER (CYBER) --- */
.loader-container {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loader-container.hidden {
    display: none;
}

.cyber-loader {
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-top: 4px solid var(--accent-primary);
    border-right: 4px solid var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- FOOTER --- */
.cyber-footer {
    border-top: 1px solid var(--border-light);
    padding: 40px 0;
    margin-top: 60px;
    background: var(--bg-surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Fix wrapping */
}

.footer-links {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- DESKTOP SPECIFIC --- */
@media (min-width: 769px) {
    .header-container {
        justify-content: space-between;
    }
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only-flex {
        display: flex !important;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-only {
        display: flex;
        /* Show hamburger on mobile */
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .header-actions {
        display: flex;
        gap: 10px;
    }

    /* Mobile Categories Horizontal Scroll */
    .categories-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 15px;
        margin-top: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .categories-grid::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .category-chip {
        flex: 0 0 auto;
        /* Prevent shrinking */
    }
}

/* --- MOBILE SIDEBAR SEARCH & EXTRAS --- */
.mobile-search-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 5px 15px;
    margin-bottom: 30px;
    width: 80%;
    border: 1px solid var(--border-light);
}

.mobile-search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    flex: 1;
    outline: none;
    padding: 10px;
}

.mobile-search-btn {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.mobile-shortcuts {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.mobile-shortcuts a {
    color: var(--accent-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
}

.mobile-theme-btn {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Load More Section */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    padding-bottom: 10px;
}

.cyber-btn-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.cyber-btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.4);
}

.cyber-btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.spinner-mini {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--border-light);
    color: var(--accent-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px var(--accent-primary);
    transform: translateY(-5px);
}

.hidden {
    display: none !important;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}