/* ============================================================
   Dark Grid Arcade – Theme Overrides
   Theme-specific effects, accents, and polish.
   ============================================================ */

/* === ENHANCED GLOW EFFECTS === */
.game-card:hover {
    box-shadow:
        0 0 20px rgba(0, 217, 255, 0.2),
        0 0 60px rgba(0, 217, 255, 0.1),
        0 8px 30px rgba(0, 0, 0, 0.4);
}

.site-logo span {
    background: linear-gradient(135deg, #00d9ff, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.3));
}

/* === CYBER GRID BACKGROUND EFFECT === */
.layout-topbar .main-content::before,
.layout-sidebar-right .content-area::before,
.layout-drawer .main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* === ANIMATED CATEGORY PILLS === */
.category-pill {
    transition: all var(--transition-fast), box-shadow var(--transition-normal);
}

.category-pill:hover {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

/* === SECTION TITLE UNDERLINE EFFECT === */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    margin-top: var(--space-xs);
    border-radius: var(--radius-full);
}

/* === GAME PLAYER FULLSCREEN === */
.game-player-container.fullscreen {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    border-radius: 0;
    margin: 0;
}

.game-player-container.fullscreen .game-player {
    aspect-ratio: unset;
    max-height: 100%;
    height: calc(100vh - 56px);
}

/* === CUSTOM SELECTION COLOR === */
::selection {
    background: var(--color-primary);
    color: #0a0a14;
}

/* === SMOOTH PAGE TRANSITIONS === */
.main-content,
.content-area {
    animation: pageIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* === FOCUS RING === */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* === LINK HOVER GLOW === */
a:hover {
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.3);
}

/* === GAME CARD LAZY LOADING === */
.game-card-thumb img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card-thumb img.loaded {
    opacity: 1;
}

/* === SCROLLBAR GLOW === */
::-webkit-scrollbar-thumb:hover {
    box-shadow: 0 0 6px rgba(0, 217, 255, 0.4);
}

/* ============================================================
   PROFILE PAGE – ENHANCED DESIGN
   ============================================================ */

/* Profile header glassmorphism card */
.page-profile .profile-header {
    background: linear-gradient(135deg, rgba(18, 18, 31, 0.95), rgba(26, 32, 46, 0.9));
    border: 1px solid rgba(0, 217, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(0, 217, 255, 0.08);
}

/* Avatar ring animation */
.profile-avatar-wrapper {
    position: relative;
}

.profile-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #00d9ff, #9333ea, #06b6d4, #00d9ff);
    animation: avatarRingSpin 6s linear infinite;
    z-index: 0;
    opacity: 0.7;
}

.profile-avatar-wrapper img {
    position: relative;
    z-index: 1;
}

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

/* Edit button polish */
.edit-avatar-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-body);
    background: var(--color-primary);
    color: #0a0a14;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edit-avatar-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.5);
}

/* Profile meta tags */
.profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.badge-xp {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* XP Progress bar enhanced */
.xp-progress {
    margin-top: 12px;
    max-width: 320px;
}

.xp-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 6px;
}

.xp-progress-bar {
    height: 6px;
    background: rgba(0, 217, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.xp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff, #9333ea);
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}

/* Profile stats – glass cards */
.page-profile .profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.page-profile .profile-stats .stat {
    background: linear-gradient(145deg, rgba(18, 18, 31, 0.8), rgba(26, 32, 46, 0.6));
    border: 1px solid rgba(0, 217, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.page-profile .profile-stats .stat:hover {
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.page-profile .stat-value {
    display: block;
    font-size: var(--text-2xl);
    font-weight: 800;
    background: linear-gradient(135deg, #00d9ff, #33e6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-profile .stat-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
}

/* ============================================================
   ACHIEVEMENT CARDS – POLISHED
   ============================================================ */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.achievement-card {
    background: linear-gradient(145deg, rgba(18, 18, 31, 0.9), rgba(26, 32, 46, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(0, 217, 255, 0.03));
    pointer-events: none;
}

.achievement-card:hover {
    border-color: rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.achievement-card.locked {
    opacity: 0.45;
    filter: grayscale(0.6);
}

.achievement-card.locked:hover {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.achievement-card.unlocked {
    border-color: rgba(0, 217, 255, 0.15);
}

.achievement-card.unlocked::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d9ff, transparent);
}

.achievement-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 217, 255, 0.06);
    border-radius: var(--radius-sm);
}

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

.achievement-card-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.achievement-card-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.4;
}

.achievement-card-xp {
    flex-shrink: 0;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-primary);
    padding: 2px 8px;
    background: rgba(0, 217, 255, 0.08);
    border-radius: var(--radius-full);
    align-self: flex-start;
}

/* ============================================================
   SECTION BLOCKS – ENHANCED
   ============================================================ */

.section-block {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

/* ============================================================
   GAME CARD – ENHANCED HOVER FX
   ============================================================ */

.game-card {
    will-change: transform;
}

.game-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
}

.play-btn-circle {
    box-shadow:
        0 0 20px rgba(0, 217, 255, 0.5),
        0 0 40px rgba(0, 217, 255, 0.2);
}

.game-badge {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ============================================================
   HEADER XP PILL – ENHANCED
   ============================================================ */

.xp-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 10px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(147, 51, 234, 0.08));
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--radius-full);
    cursor: default;
    transition: all 0.3s ease;
}

.xp-pill:hover {
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.15);
}

.xp-level {
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: 0.3px;
}

.xp-bar-mini {
    width: 48px;
    height: 4px;
    background: rgba(0, 217, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff, #9333ea);
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
}

/* ============================================================
   NOTIFICATION BELL – PULSE
   ============================================================ */

.notification-bell {
    position: relative;
}

.notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ============================================================
   SIDEBAR WIDGET – POLISHED
   ============================================================ */

.sidebar-widget {
    margin-bottom: var(--space-lg);
}

.sidebar-widget-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.sidebar-cat-link:hover {
    background: rgba(0, 217, 255, 0.06);
    color: var(--color-primary);
    text-shadow: none;
}

/* ============================================================
   TOAST NOTIFICATIONS – POLISHED
   ============================================================ */

.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    right: 16px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

/* ============================================================
   STAGGER ANIMATIONS
   ============================================================ */

.games-grid .game-card,
.achievements-grid .achievement-card {
    animation: staggerIn 0.4s ease both;
}

.games-grid .game-card:nth-child(1),
.achievements-grid .achievement-card:nth-child(1) { animation-delay: 0.02s; }
.games-grid .game-card:nth-child(2),
.achievements-grid .achievement-card:nth-child(2) { animation-delay: 0.04s; }
.games-grid .game-card:nth-child(3),
.achievements-grid .achievement-card:nth-child(3) { animation-delay: 0.06s; }
.games-grid .game-card:nth-child(4),
.achievements-grid .achievement-card:nth-child(4) { animation-delay: 0.08s; }
.games-grid .game-card:nth-child(5),
.achievements-grid .achievement-card:nth-child(5) { animation-delay: 0.10s; }
.games-grid .game-card:nth-child(6),
.achievements-grid .achievement-card:nth-child(6) { animation-delay: 0.12s; }
.games-grid .game-card:nth-child(7) { animation-delay: 0.14s; }
.games-grid .game-card:nth-child(8) { animation-delay: 0.16s; }

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

/* ============================================================
   RESPONSIVE POLISH
   ============================================================ */

@media (max-width: 768px) {
    .page-profile .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }
    .page-profile .profile-stats .stat {
        padding: var(--space-md);
    }
    .page-profile .stat-value {
        font-size: var(--text-lg);
    }
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .xp-progress {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-profile .profile-stats {
        grid-template-columns: 1fr;
    }
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === PRINT STYLES === */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .sidebar-right,
    .sidebar-left,
    .drawer,
    .drawer-topbar,
    .chat-widget,
    .toast-container,
    .drawer-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .game-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ============================================================
   SEARCH & BROWSE PAGE
   ============================================================ */

/* --- Hero / Search Bar --- */
.browse-hero {
    position: relative;
    padding: var(--space-3xl) 0 var(--space-2xl);
    margin-bottom: var(--space-lg);
    background:
        radial-gradient(ellipse at 30% 0%, rgba(0, 217, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 100%, rgba(147, 51, 234, 0.06) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-subtle);
}

.browse-hero-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.browse-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0;
}

.browse-highlight {
    background: linear-gradient(135deg, #00d9ff, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.browse-subtitle {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin: var(--space-xs) 0 0;
}

.browse-search-form {
    max-width: 600px;
    width: 100%;
}

.browse-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.browse-search-wrap:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.12), 0 0 20px rgba(0, 217, 255, 0.08);
}

.browse-search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.browse-search-input {
    flex: 1;
    padding: 14px 14px 14px 44px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    outline: none;
    min-width: 0;
}
.browse-search-input::placeholder { color: var(--text-muted); }

.browse-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 4px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.browse-search-clear:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    text-shadow: none;
}

.browse-search-btn {
    padding: 10px 22px;
    margin: 4px;
    background: linear-gradient(135deg, #00d9ff, #00b8d4);
    color: #0a0a14;
    font-weight: 700;
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.browse-search-btn:hover {
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.4);
    transform: translateY(-1px);
}

/* --- Toolbar (sort tabs + stats) --- */
.browse-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.browse-sort-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.browse-sort-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.browse-sort-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    text-shadow: none;
}
.browse-sort-tab.is-active {
    color: #0a0a14;
    background: linear-gradient(135deg, #00d9ff, #00b8d4);
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.25);
}
.browse-sort-tab svg {
    flex-shrink: 0;
}

.browse-stats {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.browse-stats-page::before {
    content: '·';
    margin-right: var(--space-sm);
}

/* --- Category Filter Pills --- */
.browse-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.browse-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.browse-cat-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-shadow: none;
}
.browse-cat-pill.is-active {
    background: rgba(0, 217, 255, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.browse-cat-pill .cat-icon {
    font-size: 13px;
}
.browse-cat-pill .cat-count {
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}
.browse-cat-pill.is-active .cat-count {
    background: rgba(0, 217, 255, 0.15);
    color: var(--color-primary);
}

/* --- Active Filter Tag --- */
.browse-active-filter {
    margin-bottom: var(--space-lg);
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: var(--text-sm);
    color: var(--color-primary);
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--radius-md);
}
.filter-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.filter-tag-remove:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-danger);
    text-shadow: none;
}

/* --- Browse grid (override default for tighter layout) --- */
.browse-grid {
    gap: var(--space-lg);
}

/* --- Empty State --- */
.browse-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}
.browse-empty-icon {
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: var(--space-lg);
}
.browse-empty-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
}
.browse-empty-text {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin: 0 0 var(--space-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.browse-empty-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .browse-hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }
    .browse-title {
        font-size: 1.4rem;
    }
    .browse-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .browse-sort-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .browse-sort-tabs::-webkit-scrollbar { display: none; }
    .browse-sort-tab {
        padding: 8px 12px;
        font-size: var(--text-xs);
    }
    .browse-sort-tab span { display: none; }
    .browse-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: var(--space-md);
    }
    .browse-categories::-webkit-scrollbar { display: none; }
    .browse-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .browse-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    .browse-search-btn {
        padding: 8px 14px;
        font-size: var(--text-xs);
    }
}
