/* ============================================
   AnimesHUB - Global Styles
   JustAnime-inspired dark theme design system
   ============================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --surface: #141414;
    --surface-hover: #1a1a1a;
    --sidebar-bg: rgba(14, 14, 14, 0.95);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --muted: #737373;
    --muted-foreground: #a3a3a3;
    --accent: #db7b3b;
    --accent-hover: #c06a2a;
    --accent-soft: rgba(219, 123, 59, 0.12);
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-muted: #525252;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);

    --font-heading: 'Sora', 'Inter', sans-serif;
    --font-body: 'Inter', 'Sora', sans-serif;
    --transition: all 0.3s ease;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: var(--foreground);
}

ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================
   HEADER / TOP NAVBAR
   ============================================ */
.header {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 24px;
    gap: 16px;
}

.nav-hamburger {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.nav-hamburger:hover {
    color: var(--foreground);
    background: rgba(255,255,255,0.05);
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    gap: 1px;
}
.logo-text { color: var(--foreground); }
.logo-hub {
    background: var(--accent);
    color: #fff;
    padding: 2px 6px 3px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 800;
}

/* Search bar */
.nav-search {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex: 1;
    max-width: 520px;
    min-width: 0;
    height: 40px;
    overflow: visible;
    position: relative;
    transition: border-color 0.2s;
}
.nav-search:focus-within { border-color: var(--border-hover); }

.search-icon-wrap {
    display: flex;
    align-items: center;
    padding: 0 10px 0 14px;
    color: var(--muted);
    flex-shrink: 0;
}

.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--foreground);
    font-size: 13px;
    width: 100%;
    height: 100%;
    font-family: var(--font-body);
}
.nav-search input::placeholder { color: var(--text-muted); }

.search-filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 0 14px;
    height: 100%;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}
.search-filter-btn:hover {
    color: var(--foreground);
    background: rgba(255,255,255,0.04);
}

/* Nav actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
    height: 36px;
}
.nav-action-btn:hover {
    color: var(--foreground);
    border-color: var(--border-hover);
    background: var(--surface-hover);
}
.nav-action-btn span { display: none; }

/* EN/JP toggle */
.anime-name-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    height: 36px;
}
.anime-name-btn:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.lang-badges { display: flex; align-items: center; gap: 2px; }
.lang-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}
.lang-badge.en { background: var(--accent); color: #fff; }
.lang-badge.en.off { background: rgba(255,255,255,0.08); color: var(--muted); }
.lang-badge.jp { background: rgba(255,255,255,0.08); color: var(--muted); }
.lang-badge.jp.on { background: var(--accent); color: #fff; }

.anime-name-label {
    font-size: 11px;
    color: var(--muted-foreground);
    white-space: nowrap;
}

/* NAV RIGHT (search toggle + login) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Search toggle icon (mobile only) */
.nav-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.nav-search-toggle:hover {
    color: var(--foreground);
    background: rgba(255,255,255,0.05);
}

/* LOGIN */
.login-btn {
    background: var(--foreground);
    color: var(--background);
    font-size: 13px;
    font-weight: 700;
    padding: 0 8px 0 16px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.login-btn:hover { opacity: 0.9; }
.login-btn .login-icon {
    background: var(--background);
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    flex-shrink: 0;
}

/* USER AVATAR DROPDOWN */
.nav-user {
    position: relative;
}
.nav-user-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}
.nav-user-btn:hover .nav-user-avatar { border-color: var(--accent); }
.nav-user-initial {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
    font-family: var(--font-heading);
}
.nav-user-btn:hover .nav-user-initial { border-color: rgba(255,255,255,0.3); }

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: #1a1a1c;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    padding: 6px;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.18s, transform 0.18s;
    transform-origin: top right;
}
.nav-user-dropdown.open {
    opacity: 1;
    pointer-events: all;
    transform: none;
}
.nav-user-info {
    padding: 8px 10px 10px;
}
.nav-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-user-email {
    font-size: 11px;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.nav-user-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.nav-user-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    text-align: left;
}
.nav-user-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-user-logout:hover { color: #f87171; background: rgba(239,68,68,0.08); }

/* MOBILE SEARCH */
.mobile-search-row {
    display: none;
    background: rgba(10, 10, 10, 0.9);
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border);
}
.mobile-search-row.open { display: flex; }
.mobile-search-row .nav-search { max-width: 100%; width: 100%; }

/* ============================================
   SHARED ANIME CARD
   ============================================ */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px 12px;
}

.anime-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s ease;
}
.anime-card:hover { transform: translateY(-4px); }

.image-container {
    position: relative;
    width: 100%;
    padding-top: 140%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--surface);
    display: block;
}
.image-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.anime-card:hover .image-container img { transform: scale(1.05); }

.badges-top {
    position: absolute;
    top: 8px; left: 8px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    z-index: 10;
    gap: 1px;
}
.badges-top span { font-size: 10px; font-weight: 700; color: #fff; line-height: 1; }
.badges-top .separator { width: 1px; height: 8px; background: rgba(255,255,255,0.3); margin: 0 4px; }

.stats-bottom {
    position: absolute;
    bottom: 8px; left: 8px;
    display: flex;
    gap: 3px;
    z-index: 10;
}
.stat-pill { transform: skewX(-12deg); border-radius: 2px; overflow: hidden; }
.stat-pill-content {
    transform: skewX(12deg);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}
.stat-pill .icon { width: 13px; height: 13px; stroke-width: 2.5; }
.stat-cc { background: var(--accent); }
.stat-mic { background: #1d4ed8; }
.stat-in { background: rgba(255,255,255,0.15); }

.card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
    display: block;
    transition: color 0.2s;
}
.anime-card:hover .card-title,
.card-title:hover { color: var(--foreground); }

/* ============================================
   SECTION SHARED
   ============================================ */
.section-container { margin-bottom: 40px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.section-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--foreground);
}
.view-more {
    color: var(--muted-foreground);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.view-more:hover { color: var(--foreground); }

/* --- Filter Tabs (language tabs) --- */
.filter-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
}
.filter-tabs .tab {
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.filter-tabs .tab:hover,
.filter-tabs .tab.active {
    color: var(--accent, #e87e22);
}

.loading-text {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 40px;
    font-size: 14px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    width: 100%;
    background: var(--surface);
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    padding: 36px 24px 28px;
    margin-top: 60px;
}

.dragon-bg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.04;
    width: 180px; height: 180px;
    pointer-events: none;
    user-select: none;
}

.alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 28px;
    justify-content: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.alpha-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}
.alpha-nav a:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--border-hover);
    color: var(--foreground);
}

.footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.brand { display: flex; align-items: center; margin-bottom: 12px; }
.brand-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
}
.brand-badge {
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: 2px;
}

.site-footer .copyright {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 36px;
    text-align: right;
}
.footer-links a {
    color: var(--muted-foreground);
    font-size: 13px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--foreground); }

/* ============================================
   SEARCH SUGGESTIONS
   ============================================ */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: -1px; right: -1px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    max-height: 420px;
    overflow-y: auto;
    z-index: 999;
    display: none;
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.search-suggestions.active,
.search-suggestions.show { display: block; }

.suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.suggest-item:hover { background: rgba(255,255,255,0.04); }
.suggest-item:last-child { border-bottom: none; }
.suggest-item img {
    width: 40px; height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.suggest-info { flex: 1; min-width: 0; }
.suggest-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggest-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.suggest-viewall {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    border-top: 1px solid var(--border);
}
.suggest-viewall:hover { background: rgba(255,255,255,0.03); }
.suggest-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ============================================
   MOBILE SIDEBAR
   ============================================ */
.mobile-sidebar {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    visibility: hidden;
}
.mobile-sidebar.open { pointer-events: auto; visibility: visible; }
.mobile-sidebar .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .3s ease;
}
.mobile-sidebar.open .sidebar-overlay { opacity: 1; }
.mobile-sidebar .sidebar-panel {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform .3s ease;
    overflow-y: auto;
    padding: 20px;
}
.mobile-sidebar.open .sidebar-panel { transform: translateX(0); }
.mobile-sidebar .sidebar-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.mobile-sidebar .sidebar-close {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
}
.mobile-sidebar .sidebar-close:hover { color: var(--foreground); }
.mobile-sidebar .sidebar-nav { display: flex; flex-direction: column; }
.mobile-sidebar .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--muted-foreground);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,.04);
    transition: color .2s;
}
.mobile-sidebar .sidebar-nav a:hover { color: var(--foreground); }

/* User section in mobile sidebar for logged-in users */
.mobile-sidebar .sidebar-user-section {
    display: flex;
    flex-direction: column;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.mobile-sidebar .sidebar-user-section a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,.04);
    transition: color .2s;
}
.mobile-sidebar .sidebar-user-section a:last-child { border-bottom: none; }
.mobile-sidebar .sidebar-user-section a:hover { color: var(--foreground); }

.mobile-sidebar .sidebar-lang-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}
.mobile-sidebar .sidebar-lang-label { font-size: 13px; color: var(--muted); }
.mobile-sidebar .sidebar-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 5px 10px;
    cursor: pointer;
}
.mobile-sidebar .sidebar-lang-btn .lang-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ============================================
   SKELETON
   ============================================ */
.skeleton,
.skeleton-pulse {
    background: linear-gradient(90deg, var(--surface) 25%, rgba(255,255,255,0.06) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}
@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   CARD OVERLAYS
   ============================================ */
.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    z-index: 5;
}
.image-container:hover .card-play-overlay { opacity: 1; }
.card-play-overlay i { color: #fff; }

.badge-18 {
    position: absolute;
    top: 8px; right: 8px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 10;
}

/* ============================================
   ERROR STATE
   ============================================ */
.error-state {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
}
.error-state h2 { color: var(--foreground); margin: 12px 0 6px; }
.error-state p { font-size: .88rem; margin-bottom: 20px; }
.error-state .btn-primary,
.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--foreground);
    color: var(--background);
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.retry-btn:hover { opacity: 0.9; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) { .anime-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 992px) { .anime-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; } }
@media (max-width: 900px) {
    .nav-search { max-width: 280px; }
    .nav-action-btn, .anime-name-btn { padding: 6px 8px; }
}
@media (max-width: 700px) {
    .desktop-search { display: none; }
    .nav-search-toggle { display: flex; }
    .nav-actions { display: none; }
    .nav-container { gap: 8px; padding: 0 12px; }
    .login-btn { padding: 0 6px 0 14px; font-size: 12px; height: 34px; gap: 6px; }
    .login-btn .login-icon { width: 24px; height: 24px; }
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
    .footer-bottom > div:first-child { display: flex; flex-direction: column; align-items: center; }
    .brand { justify-content: center; }
    .footer-links { text-align: center; grid-template-columns: 1fr; gap: 10px; width: 100%; }
}
@media (max-width: 600px) { .anime-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; } }
@media (max-width: 590px) {
    .anime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
    .nav-container { padding: 0 10px; }
    .section-container { margin-bottom: 24px; padding: 0 8px; }
    .section-header h2 { font-size: 15px; }
    .section-header { margin-bottom: 10px; }
    .filter-tabs { gap: 12px; }
    .filter-tabs .tab { font-size: 12px; }
    .alpha-nav a { width: 34px; height: 30px; font-size: 11px; }
    .alpha-nav { gap: 3px; margin-bottom: 18px; }
    .card-title { font-size: 12px; }
    .stat-pill-content { padding: 2px 6px; font-size: 10px; }
    .site-footer { padding: 24px 14px 20px; }
    .footer-links a { font-size: 12px; }
}
@media (max-width: 480px) {
    .nav-container { gap: 6px; padding: 0 8px; }
    .nav-logo { font-size: 17px; } .logo-hub { font-size: 14px; }
    .nav-right { gap: 4px; }
    .login-btn { font-size: 11px; padding: 0 4px 0 10px; height: 32px; gap: 4px; }
    .login-btn .login-icon { width: 22px; height: 22px; }
    .stat-pill-content { padding: 2px 5px; font-size: 9px; }
    .stat-pill .icon { width: 10px; height: 10px; }
    .badges-top { padding: 2px 4px; } .badges-top span { font-size: 9px; }
    .card-title { font-size: 11.5px; }
    .section-container { margin-bottom: 20px; padding: 0 4px; }
    .section-header { margin-bottom: 10px; }
    .section-header h2 { font-size: 14px; }
    .filter-tabs { gap: 8px; }
    .filter-tabs .tab { font-size: 11px; }
    .alpha-nav a { width: 28px; height: 24px; font-size: 9px; }
    .alpha-nav { gap: 2px; margin-bottom: 14px; }
    .site-footer { padding: 18px 10px 14px; margin-top: 20px; }
    .footer-links a { font-size: 11px; }
    .footer-bottom { gap: 16px; }
    .brand { font-size: 18px; }
    .footer-tagline { font-size: 11px; }
}
@media (max-width: 420px) { .anime-grid { gap: 10px 6px; } }
@media (max-width: 360px) {
    .nav-container { gap: 3px; padding: 0 4px; }
    .nav-logo { font-size: 14px; } .logo-hub { font-size: 12px; padding: 2px 4px; }
    .login-btn { font-size: 10px; padding: 0 3px 0 6px; height: 30px; }
    .login-btn .login-icon { width: 20px; height: 20px; }
    .nav-right { gap: 3px; }
    .section-container { padding: 0 2px; }
    .card-title { font-size: 11px; }
    .alpha-nav a { width: 24px; height: 22px; font-size: 8px; }
    .alpha-nav { gap: 1px; margin-bottom: 12px; }
    .anime-grid { gap: 8px 4px; }
}
@media (max-width: 700px) {
    .search-suggestions { max-height: 60vh; }
    .suggest-item { padding: 8px 12px; }
    .suggest-item img { width: 34px; height: 48px; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
