/*
Theme Name: Miscaption
Theme URI: https://kesifasya.com
Author: KeşifAsya
Author URI: https://kesifasya.com
Description: Miscaption is designed to be flexible, versatile and applicable to any subtitle or media platform. Its collection of templates and dynamic components tailor to different needs, such as presenting movie catalogs, organizing series subtitles, or building fan communities. A multitude of possibilities open up with our custom AniList-inspired dark-mode design system. Miscaption comes with advanced subtitle upload wizards, style variations, and full page designs to help speed up the site building process, is fully compatible with custom post type systems, and takes advantage of blazing-fast metadata APIs to deliver a premium user experience.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miscaption
Tags: dark-mode, anime, subtitles, custom-post-types, responsive
*/

/* =============================================================
   MISCAPTION GLOBAL — DESIGN SYSTEM
   AniList-inspired dark-first theme
   ============================================================= */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- CSS VARIABLES (DARK — Default) --- */
:root {
    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Colors — Dark Theme */
    --bg-primary:     #161719; /* SubSource Main Background */
    --bg-secondary:   #1E1F23; /* SubSource Content Areas, Tables, Sidebar items */
    --bg-tertiary:    #1A1C20;
    --bg-navbar:      #1E1F23;
    --bg-card:        #1E1F23;
    --bg-hover:       #25272C;
    --bg-input:       #292A2E;

    --text-primary:   #EAEAEA;
    --text-secondary: #BOB2B6;
    --text-muted:     #84868A;
    --text-bright:    #FFFFFF;

    --accent:         #21A59A; /* SubSource Teal */
    --accent-dark:    #1A877E;
    --accent-glow:    rgba(33, 165, 154, 0.15);
    --accent-surface: rgba(33, 165, 154, 0.1);
    --accent-contrast:#FFFFFF;

    --green:   #4CCA51;
    --red:     #FF4A4A;
    --orange:  #F79A63;
    --purple:  #A463F5;
    --yellow:  #E5B81B; /* IMDb Yellow */

    --border:       #27292D;
    --border-light: #32353A;

    --shadow:    0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.35);

    --anime-panel-subtitles-tint: rgba(33, 165, 154, 0.12);
    --anime-panel-community-tint: rgba(59, 130, 246, 0.1);
    --anime-panel-details-tint: rgba(148, 163, 184, 0.12);

    /* Spacing */
    --radius:      4px;  /* Sharper corners like SubSource */
    --radius-sm:   3px;
    --radius-lg:   6px;
    --radius-full: 9999px;

    --container:   1300px;
}

/* --- LIGHT THEME (Not requested, kept as fallback to dark) --- */
[data-theme="light"] {
    --bg-primary:     #F3F4F6;
    --bg-secondary:   #FFFFFF;
    --bg-tertiary:    #F9FAFB;
    --bg-navbar:      #FFFFFF;
    --bg-card:        #FFFFFF;
    --bg-hover:       #F3F4F6;
    --bg-input:       #F9FAFB;

    --text-primary:   #1F2937;
    --text-secondary: #4B5563;
    --text-muted:     #6B7280;
    --text-bright:    #111827;

    --accent:         #21A59A;
    --accent-surface: rgba(33, 165, 154, 0.08);
    --accent-contrast:#FFFFFF;
    --border:         #E5E7EB;
    --border-light:   #F3F4F6;
    --shadow:         0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg:      0 4px 6px rgba(0, 0, 0, 0.05);

    --anime-panel-subtitles-tint: rgba(33, 165, 154, 0.06);
    --anime-panel-community-tint: rgba(59, 130, 246, 0.05);
    --anime-panel-details-tint: rgba(148, 163, 184, 0.08);
}

/* System preference */
@media (prefers-color-scheme: light) {
    [data-theme="system"] {
        background: var(--bg-primary); /* Force dark to prevent jarring shifts unless handled by JS perfectly */
    }
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html.theme-loading *,
html.theme-loading *::before,
html.theme-loading *::after {
    transition: none !important;
}

body {
    background: var(--bg-primary);
    font-family: var(--font);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px; /* SubSource uses dense UI */
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border-radius: var(--radius-sm); }
button, input, select, textarea { font-family: var(--font); font-size: inherit; }

/* --- ACCESSIBILITY --- */
.skip-nav {
    position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: var(--accent-contrast); padding: 8px 16px;
    border-radius: 0 0 var(--radius) var(--radius); z-index: 100000;
    font-weight: 600; font-size: 0.85rem;
}
.skip-nav:focus { top: 0; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; height: 6px;}
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- CONTAINER --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* =============================================================
   HEADER / NAVBAR
   ============================================================= */
.header-root {
    position: sticky; top: 0; z-index: 9999;
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--border);
    /* SubSource has a solid header without blur */
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 1.5rem;
}

/* Logo */
.header-logo a {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; flex-shrink: 0;
    margin-right: 16px;
}
.header-logo-icon {
    height: 40px; width: auto; flex-shrink: 0;
}
.logo-block { display:flex; flex-direction: column; line-height: 1.05; }
.logo-text-top { font-weight: 800; font-size: 1.08rem; color: var(--text-bright); letter-spacing: 0.04em; text-transform: uppercase; }
.logo-text-bot { font-weight: 600; font-size: 0.66rem; color: var(--text-muted); letter-spacing: 0.28em; text-transform: uppercase; }

/* Header Navigation (Left) */
.header-nav {
    display: flex; align-items: center; gap: 16px;
}
.header-nav-ul {
    display: flex; align-items: center; gap: 16px;
    list-style: none; margin: 0; padding: 0;
}
.header-nav .nav-link, .header-nav-ul li a {
    font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    transition: color 0.1s; text-decoration: none;
}
.header-nav .nav-link:hover, .header-nav .nav-link.active,
.header-nav-ul li a:hover, .header-nav-ul li.current-menu-item > a {
    color: var(--accent);
}


/* Search */
.header-search { flex: 1; max-width: 480px; position: relative; z-index: 10001; margin-left: auto; margin-right: 20px;}
.search-box {
    display: flex; align-items: center;
    border-radius: var(--radius);
    background: var(--bg-input);
    border: 1px solid var(--border);
    overflow: hidden; transition: all 0.1s;
    height: 38px;
}
.search-box:focus-within {
    border-color: var(--text-muted);
}
.search-box input {
    background: transparent; border: none; color: var(--text-primary);
    padding: 0 14px; flex: 1; outline: none;
    font-size: 0.85rem; height: 100%; min-width: 0;
}
.search-box input::placeholder { color: var(--text-muted); font-size: 0.85rem; }
.search-btn {
    background: none; border: none; color: var(--text-muted);
    padding: 0 12px; cursor: pointer; transition: color 0.1s;
    display: inline-flex; align-items: center; justify-content: center;
    height: 100%;
}
.search-btn:hover { color: var(--text-bright); }

/* Suggestions */
.suggestions-box {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    z-index: 10002; max-height: 420px; overflow-y: auto;
    display: none; padding: 6px;
}
.suggestions-box.show { display: block; }
.suggestions-category {
    padding: 8px 10px 4px; font-size: 0.7rem; color: var(--text-muted);
    text-transform: uppercase; font-weight: 700; letter-spacing: 0.08em;
}
.suggestion-item a {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px; border-radius: var(--radius);
    color: var(--text-primary); transition: background 0.15s;
}
.suggestion-item a:hover { background: var(--bg-hover); }
.suggestion-img {
    width: 42px; height: 58px; flex-shrink: 0;
    overflow: hidden; border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}
.suggestion-img img { width: 100%; height: 100%; object-fit: cover; }
.suggestion-text { display: flex; flex-direction: column; min-width: 0; }
.suggestion-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9rem; font-weight: 500; }
.suggestion-text small { color: var(--text-muted); font-size: 0.75rem; }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }

.icon-btn {
    position: relative; width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius); color: var(--text-secondary);
    background: transparent; border: none; cursor: pointer;
    font-size: 1.1rem; transition: all 0.15s; text-decoration: none;
}
.icon-btn:hover { color: var(--text-bright); background: var(--bg-hover); }

.badge-count {
    position: absolute; top: 2px; right: 2px;
    background: var(--red); color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.6rem; font-weight: 700;
    min-width: 16px; height: 16px; line-height: 16px;
    text-align: center; padding: 0 4px;
    border: 2px solid var(--bg-navbar);
    opacity: 0; transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.badge-count.visible { opacity: 1; transform: scale(1); }

/* Auth Buttons */
.btn-login {
    color: var(--text-primary); font-size: 0.85rem; font-weight: 500;
    padding: 8px 14px; border-radius: var(--radius); transition: all 0.15s;
    background: none; border: none; cursor: pointer;
}
.btn-login:hover { color: var(--text-bright); background: var(--bg-hover); }
.btn-signup {
    background: var(--accent); color: var(--accent-contrast) !important;
    font-size: 0.85rem; font-weight: 600;
    padding: 8px 16px; border-radius: var(--radius);
    transition: all 0.15s; display: inline-flex; align-items: center;
    border: none; cursor: pointer;
}
.btn-signup:hover { background: var(--accent-dark); }

/* User Avatar */
.user-avatar-btn {
    display: block; width: 38px; height: 38px;
    border-radius: var(--radius-full); overflow: hidden;
    cursor: pointer; flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.15s;
    background: var(--bg-tertiary); padding: 0;
}
.user-avatar-btn:hover { border-color: var(--accent); }
.user-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; right: 0;
    top: calc(100% + 8px); min-width: 260px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    z-index: 99999; padding: 6px;
    animation: dropdownIn 0.18s ease-out;
}
.dropdown.show > .dropdown-menu { display: block; }
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dropdown-header-user {
    padding: 12px 10px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border); margin-bottom: 4px;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: background 0.15s;
}
.dropdown-header-user:hover { background: var(--bg-hover); }
.dropdown-header-user img { width: 42px; height: 42px; border-radius: var(--radius-full); object-fit: cover; }
.dropdown-header-user .user-name { color: var(--text-bright); font-weight: 700; font-size: 0.95rem; }
.dropdown-header-user .user-handle { color: var(--text-muted); font-size: 0.8rem; }
.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; color: var(--text-secondary);
    border-radius: var(--radius); font-size: 0.875rem;
    font-weight: 500; transition: all 0.15s;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-bright); }
.dropdown-item i { width: 18px; text-align: center; font-size: 0.9rem; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.text-accent { color: var(--accent) !important; }
.text-red    { color: var(--red) !important; }

/* Removed main-nav code to match SubSource header */

/* Theme Toggle */
.theme-toggle {
    display: flex; align-items: center; gap: 4px;
    padding: 2px; border-radius: var(--radius);
    background: transparent; border: none; margin-left: 8px;
}
.theme-toggle-header {
    margin-left: 12px;
    margin-right: 8px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-input);
    flex-shrink: 0;
}
.theme-btn {
    width: 28px; height: 28px;
    border-radius: var(--radius);
    border: none; background: transparent;
    color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; transition: background 0.1s, color 0.1s;
}
.theme-btn:hover { color: var(--text-bright); background: var(--bg-hover); }
.theme-btn.active {
    background: var(--bg-input); color: var(--text-primary);
}
.theme-toggle-header .theme-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
}
.theme-toggle-header .theme-btn.active {
    background: var(--bg-card);
    color: var(--text-bright);
    box-shadow: var(--shadow);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none; background: transparent; border: none;
    color: var(--text-secondary); font-size: 1.3rem;
    cursor: pointer; padding: 8px; border-radius: var(--radius);
    width: 44px; height: 44px; align-items: center; justify-content: center;
}
.mobile-toggle:hover { color: var(--text-bright); background: var(--bg-hover); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
    background: var(--bg-primary); /* Same as body */
    padding: 3rem 0;
    margin-top: 2rem;
}
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.footer-logo {
    margin-bottom: 0.5rem;
}
.footer-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.footer-logo .header-logo-icon {
    height: 52px;
}
.footer-logo .logo-text-top {
    font-size: 1.14rem;
}
.footer-logo .logo-text-bot {
    letter-spacing: 0.24em;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.footer-nav a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.1s;
}
.footer-nav a:hover {
    color: var(--text-bright);
}
.footer-social-icons {
    display: flex;
    gap: 16px;
    margin: 0.5rem 0;
}
.footer-social-icons a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.1s;
}
.footer-social-icons a:hover {
    color: var(--text-bright);
}
.footer-copy {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* =============================================================
   COMMON COMPONENTS
   ============================================================= */

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Anime Card */
.anime-card {
    display: flex; flex-direction: column;
    position: relative; min-width: 0;
}
.anime-card-link { position: absolute; inset: 0; z-index: 1; }
.anime-card-poster {
    position: relative; aspect-ratio: 2/3;
    overflow: hidden; background: var(--bg-tertiary);
}
.anime-card-poster img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.anime-card:hover .anime-card-poster img { transform: scale(1.05); }
.anime-card-gradient {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    pointer-events: none;
}
.anime-card-body {
    padding: 10px 12px;
    display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.anime-card-title {
    font-size: 0.78rem; font-weight: 700; color: var(--text-bright);
    line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.anime-card:hover .anime-card-title { color: var(--accent); }
.anime-card-meta {
    font-size: 0.68rem; color: var(--text-muted); margin-top: 3px;
    font-weight: 600;
}

/* Badges */
.card-badge {
    position: absolute; z-index: 2;
    font-size: 0.55rem; font-weight: 800;
    text-transform: uppercase; padding: 2px 7px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(6px); letter-spacing: 0.03em;
}
.card-badge.top-left { top: 6px; left: 6px; }
.card-badge.top-right { top: 6px; right: 6px; }
.card-badge.type-badge { background: var(--accent); color: #000; }
.card-badge.ai-badge { background: var(--purple); color: #fff; }
.card-badge.sub-count {
    position: absolute; bottom: 6px; right: 6px; z-index: 2;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    padding: 3px 7px; border-radius: var(--radius);
    font-size: 0.65rem; font-weight: 700; color: #fff;
    display: flex; align-items: center; gap: 3px;
}
.card-badge.sub-count i { color: var(--accent); font-size: 0.55rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
    transition: all 0.15s; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-primary);
    text-decoration: none;
}
.btn:hover { background: var(--bg-hover); color: var(--text-bright); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-danger { background: rgba(232,93,117,0.1); color: var(--red); border-color: rgba(232,93,117,0.3); }
.btn-danger:hover { background: rgba(232,93,117,0.2); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Widget / Section Card */
.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.widget-head {
    display: flex; align-items: center; gap: 10px;
    font-size: 1rem; font-weight: 800; color: var(--text-bright);
    margin: 0 0 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.widget-head i { color: var(--accent); font-size: 0.9rem; }
.widget-head .head-right { margin-left: auto; font-size: 0.78rem; font-weight: 600; }
.widget-head .head-right a { color: var(--accent); }
.widget-head .head-right a:hover { text-decoration: underline; }

/* Pills / Tags */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: var(--radius-full);
    font-size: 0.78rem; font-weight: 600;
}
.pill-default { background: var(--bg-tertiary); color: var(--text-secondary); }
.pill-accent { background: var(--accent-surface); color: var(--accent); }
.genre-tag {
    padding: 4px 10px; border-radius: var(--radius-full);
    background: var(--accent-surface); color: var(--accent);
    font-size: 0.75rem; font-weight: 700;
    text-decoration: none; transition: all 0.15s;
}
.genre-tag:hover { background: var(--accent); color: #000; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-weight: 600; font-size: 0.82rem;
    color: var(--text-secondary); margin-bottom: 6px;
}
.form-control {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary);
    font-size: 0.9rem; transition: all 0.15s; outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control {
    cursor: pointer;
    color-scheme: dark;
    background-color: var(--bg-input) !important;
    color: var(--text-bright) !important;
    border-color: var(--border-light);
    forced-color-adjust: none;
}
select.form-control option,
select.form-control optgroup {
    background: var(--bg-secondary) !important;
    color: var(--text-bright) !important;
    box-shadow: 0 0 0 100vmax var(--bg-secondary) inset;
    -webkit-text-fill-color: var(--text-bright);
}
select.form-control option:checked,
select.form-control option:hover,
select.form-control option:focus,
select.form-control option:active {
    background: var(--accent-dark) !important;
    color: var(--accent-contrast) !important;
    box-shadow: 0 0 0 100vmax var(--accent-dark) inset;
    -webkit-text-fill-color: var(--accent-contrast);
}
select.form-control:disabled,
select.form-control option:disabled {
    color: var(--text-muted);
}
[data-theme="light"] select.form-control {
    color-scheme: light;
}

/* Grid Layouts */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.anime-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

/* Section Title */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section-title h2 {
    font-size: 1.1rem; font-weight: 800; color: var(--text-bright);
    display: flex; align-items: center; gap: 8px;
}
.section-title h2 i { color: var(--accent); font-size: 0.95rem; }
.section-title a {
    color: var(--accent); font-size: 0.82rem; font-weight: 600;
    transition: opacity 0.15s;
}
.section-title a:hover { opacity: 0.8; }

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.25rem;
    text-align: center; transition: all 0.15s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-icon { font-size: 1.2rem; color: var(--accent); margin-bottom: 8px; }
.stat-val { font-size: 1.6rem; font-weight: 900; color: var(--text-bright); }
.stat-lbl {
    font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px;
}

/* Anime Page Layout (2-column) */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.page-main { min-width: 0; }
.page-sidebar { min-width: 0; }

/* Hero Banner */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center 30%;
    filter: blur(30px) brightness(0.35) saturate(1.3);
    transform: scale(1.15);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,22,34,0.4) 0%, rgba(11,22,34,0.92) 100%);
}
.hero-content {
    position: relative; z-index: 3;
    display: flex; gap: 2rem; padding: 2.5rem;
    align-items: flex-end;
}
.hero-poster { flex-shrink: 0; width: 200px; }
.hero-poster img {
    width: 100%; aspect-ratio: 2/3; object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
}
.hero-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 0.6rem;
}
.hero-title {
    font-size: 2rem; font-weight: 800; color: #fff;
    line-height: 1.2; margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-subtitle {
    font-size: 1.1rem; font-weight: 600; color: var(--accent);
}
.hero-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
    font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.85);
}
.hero-pill i { font-size: 0.7rem; opacity: 0.7; }
.hero-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.3rem; }

/* Anime Detail Refresh */
.anime-detail-page {
    padding-bottom: 4rem;
}
.anime-detail-hero {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(11, 17, 26, 0.32) 0%, rgba(11, 17, 26, 0.86) 68%, #0b111b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.anime-detail-hero__backdrop,
.anime-detail-hero__shade,
.anime-detail-hero__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.anime-detail-hero__backdrop {
    background-size: cover;
    background-position: center 28%;
    filter: saturate(1.02) contrast(1.02) brightness(0.34);
    transform: scale(1.03);
}
.anime-detail-hero__shade {
    background:
        linear-gradient(180deg, rgba(8, 12, 18, 0.22) 0%, rgba(8, 12, 18, 0.78) 58%, rgba(10, 15, 23, 0.96) 100%),
        linear-gradient(90deg, rgba(8, 12, 18, 0.72) 0%, rgba(8, 12, 18, 0.22) 44%, rgba(8, 12, 18, 0.82) 100%);
}
.anime-detail-hero__glow {
    background: linear-gradient(180deg, transparent 0%, rgba(11, 17, 27, 0.18) 100%);
    opacity: 1;
}
.anime-detail-hero__inner,
.anime-detail-shell {
    width: min(100%, var(--container));
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}
.anime-detail-hero__inner {
    position: relative;
    z-index: 2;
    display: block;
    padding-top: 3.25rem;
    padding-bottom: 6.75rem;
}
.anime-detail-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    padding-bottom: 1rem;
    max-width: 860px;
}
.anime-detail-hero__eyebrow,
.anime-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}
.anime-detail-hero__eyebrow span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.anime-detail-hero__status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-color, var(--accent));
    box-shadow: none;
}
.anime-detail-hero__title {
    margin: 0;
    font-size: clamp(2.1rem, 4.4vw, 3.3rem);
    line-height: 1.02;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    max-width: 14ch;
}
.anime-detail-hero__subtitle {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
    font-weight: 500;
}
.anime-detail-hero__summary {
    margin: 0;
    max-width: 72ch;
    color: rgba(221, 229, 238, 0.82);
    line-height: 1.65;
    font-size: 0.92rem;
}
.anime-detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    border: 1px solid rgba(33, 165, 154, 0.18);
    background: rgba(33, 165, 154, 0.08);
    color: var(--text-secondary);
    font-size: 0.73rem;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.anime-detail-tag:hover {
    border-color: rgba(33, 165, 154, 0.34);
    background: rgba(33, 165, 154, 0.16);
    color: #fff;
}
.anime-detail-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding-top: 0;
}
.anime-detail-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 1.25rem;
    margin-top: -5.5rem;
}
.anime-detail-main {
    min-width: 0;
    display: grid;
    gap: 1.25rem;
}
.anime-detail-main #anime-overview {
    display: none;
}
.anime-detail-main section[id],
.anime-detail-sidebar section[id] {
    scroll-margin-top: 110px;
}
.anime-panel {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: none;
    padding: 1.45rem 1.55rem 1.55rem;
}
.anime-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 86px;
    background: linear-gradient(135deg, var(--anime-panel-tint, rgba(33, 165, 154, 0.08)) 0%, transparent 72%);
    pointer-events: none;
}
.anime-panel > * {
    position: relative;
    z-index: 1;
}
.anime-panel--hero {
    padding: 1.6rem 1.7rem 1.7rem;
}
.anime-panel__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.anime-panel__header--wide {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.anime-panel__header h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-bright);
    font-weight: 700;
}
.anime-detail-sidebar .anime-panel {
    --anime-panel-tint: var(--anime-panel-details-tint);
}
#anime-subtitles {
    --anime-panel-tint: var(--anime-panel-subtitles-tint);
    margin-top: 0.9rem;
}
#anime-community {
    --anime-panel-tint: var(--anime-panel-community-tint);
}
.anime-detail-sidebar__poster-card {
    display: grid;
    gap: 0.75rem;
}
.anime-detail-sidebar__poster {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    box-shadow: none;
}
.anime-detail-sidebar__poster img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}
.anime-detail-sidebar__actions {
    display: grid;
    gap: 0.5rem;
}
.anime-detail-sidebar__actions .btn {
    justify-content: center;
    border-radius: 4px;
    min-height: 38px;
    font-size: 0.82rem;
}
.anime-inline-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
}
.anime-info-list__row {
    display: block;
}
.anime-info-list__row span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.anime-info-list__row strong {
    display: block;
    margin-top: 0.24rem;
    color: var(--text-bright);
    font-size: 0.84rem;
    text-align: left;
    line-height: 1.45;
    font-weight: 500;
}
.anime-info-list {
    display: block;
}
.anime-info-list__row {
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}
.anime-info-list__row:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}
.anime-title-stack {
    display: grid;
    gap: 0.55rem;
}
.anime-title-stack__item {
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
}
.anime-title-stack__item span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.anime-title-stack__item strong {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 500;
}
.anime-detail-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.anime-overview-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.72;
}
.anime-overview-copy > *:first-child {
    margin-top: 0;
}
.anime-overview-copy > *:last-child {
    margin-bottom: 0;
}
.anime-meta-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.anime-meta-group__title {
    margin: 0 0 0.65rem;
    color: var(--text-bright);
    font-size: 0.8rem;
    font-weight: 700;
}
.anime-detail-subtitles {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.45rem;
}
.anime-detail-subtitles .sub-item {
    padding: 1rem 1.15rem;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border-color: var(--border);
}
.anime-detail-subtitles .sub-item:hover {
    background: var(--accent-surface);
    border-color: rgba(33, 165, 154, 0.24);
}
.anime-detail-subtitles .sub-avatar {
    width: 42px;
    height: 42px;
}
.anime-detail-subtitles .sub-title {
    font-size: 1rem;
    gap: 0.6rem;
}
.anime-detail-subtitles .sub-meta {
    margin-top: 0.45rem;
    column-gap: 0.85rem;
    row-gap: 0.45rem;
    font-size: 0.81rem;
}
.anime-detail-subtitles .sub-arrow {
    font-size: 0.95rem;
    padding-left: 0.75rem;
}
.anime-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.8rem;
    padding: 2.2rem 1rem;
    text-align: center;
    border-radius: 4px;
    border: 1px dashed var(--border-light);
    background: var(--bg-tertiary);
}
.anime-empty-state i {
    font-size: 2rem;
    color: var(--accent);
}
.anime-empty-state h3 {
    margin: 0;
    color: var(--text-bright);
}
.anime-empty-state p {
    max-width: 52ch;
    margin: 0;
    color: var(--text-muted);
}
.anime-empty-state--soft {
    padding-top: 2.2rem;
    padding-bottom: 2.2rem;
}
.anime-community-tabs {
    display: inline-flex;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}
.anime-community-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 40px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.anime-community-tab strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: inherit;
    font-size: 0.74rem;
}
.anime-community-tab.is-active {
    color: var(--text-bright);
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.1);
}
.anime-community-pane {
    display: none;
}
.anime-community-pane.is-active {
    display: block;
}
.anime-community-pane__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.18);
}
.anime-community-pane__title {
    margin: 0;
    color: var(--text-bright);
    font-size: 1rem;
    font-weight: 700;
}
.anime-community-pane__copy {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.65;
}
.anime-thread-list,
.anime-review-list {
    display: grid;
    gap: 0.9rem;
}
.anime-thread-card,
.anime-review-card {
    display: block;
    padding: 1.1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-card) 88px);
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.anime-thread-card {
    text-decoration: none;
}
.anime-thread-card:hover {
    border-color: rgba(33, 165, 154, 0.28);
    background: linear-gradient(180deg, var(--accent-surface) 0%, var(--bg-card) 88px);
    transform: translateY(-1px);
}
.anime-thread-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}
.anime-thread-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: rgba(33, 165, 154, 0.14);
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 700;
}
.anime-thread-card__title {
    margin: 0.65rem 0 0;
    color: var(--text-bright);
    font-size: 1rem;
    line-height: 1.35;
}
.anime-thread-card__excerpt {
    margin: 0.6rem 0 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.75;
}
.anime-thread-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.85rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}
.anime-thread-card__stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.anime-review-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.anime-review-card__identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}
.anime-review-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(33, 165, 154, 0.08);
}
.anime-review-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.anime-review-card__author {
    color: var(--text-bright);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
}
.anime-review-card__author:hover {
    color: var(--accent);
}
.anime-review-card__date {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.anime-review-card__body {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
}
.anime-review-card__body > *:first-child {
    margin-top: 0;
}
.anime-review-card__body > *:last-child {
    margin-bottom: 0;
}
.anime-review-form-shell {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.anime-review-form-shell__header {
    margin-bottom: 1rem;
}
.anime-review-form {
    display: grid;
    gap: 1rem;
}
.anime-review-form__field,
.anime-review-form .form-submit {
    margin: 0;
}
.anime-review-form__field label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-bright);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.anime-review-form .form-control {
    min-height: 52px;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.anime-review-form textarea.form-control {
    min-height: 200px;
    resize: vertical;
}
.anime-review-form .form-control:focus {
    outline: none;
    border-color: rgba(33, 165, 154, 0.42);
    box-shadow: 0 0 0 4px rgba(33, 165, 154, 0.12);
    background: rgba(255, 255, 255, 0.045);
}
.anime-review-form__footer {
    display: flex;
    justify-content: flex-end;
}
.anime-review-submit {
    min-height: 46px;
    padding-inline: 1.35rem;
    border-radius: var(--radius-full);
    font-weight: 700;
}
.anime-review-guest {
    padding: 1rem 1.05rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.anime-review-guest__copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.6;
}
.anime-review-guest__actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.9rem;
}
.anime-review-guest__login {
    color: var(--text-bright);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}
.anime-review-guest__login:hover {
    color: var(--accent);
}
#anime-comments .anime-comments-shell {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
#anime-comments .anime-comments-title,
#anime-comments .anime-comments-reply-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-bright);
    font-size: 1rem;
    font-weight: 700;
}
#anime-comments .anime-comments-title {
    margin-bottom: 1.1rem;
}
#anime-comments .anime-comments-reply-title {
    margin-bottom: 1rem;
}
#anime-comments .anime-comments-title i,
#anime-comments .anime-comments-reply-title i {
    color: var(--accent);
    font-size: 0.9rem;
}
#anime-comments .anime-comments-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
#anime-comments .anime-comment-card {
    margin: 0;
    padding: 1.15rem 1.2rem 1.15rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(33, 165, 154, 0.06) 0%, rgba(33, 165, 154, 0.015) 84px, rgba(18, 24, 34, 0.92) 84px);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
#anime-comments .anime-comment-card.is-replying {
    border-color: rgba(33, 165, 154, 0.32);
    box-shadow: 0 0 0 1px rgba(33, 165, 154, 0.08);
}
#anime-comments .anime-comment-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
#anime-comments .anime-comment-card__identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
#anime-comments .anime-comment-card__author-block {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex-wrap: wrap;
}
#anime-comments .comment-avatar {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(33, 165, 154, 0.08);
}
#anime-comments .anime-comment-card__author a {
    color: var(--text-bright);
    font-size: 0.94rem;
    font-weight: 700;
}
#anime-comments .anime-comment-card__author a:hover {
    color: var(--accent);
}
#anime-comments .anime-comment-card__date {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}
#anime-comments .anime-comment-card__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-shrink: 0;
}
#anime-comments .anime-comment-card__body {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
}
#anime-comments .anime-comment-card__body > *:first-child {
    margin-top: 0;
}
#anime-comments .anime-comment-card__body > *:last-child {
    margin-bottom: 0;
}
#anime-comments .anime-comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(33, 165, 154, 0.2);
    background: rgba(33, 165, 154, 0.08);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}
#anime-comments .anime-comment-reply-link a {
    color: inherit;
    text-decoration: none;
}
#anime-comments .anime-comment-reply-link:hover {
    color: #fff;
    border-color: rgba(33, 165, 154, 0.32);
    background: rgba(33, 165, 154, 0.14);
}
#anime-comments .children {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.9rem;
    margin-left: 2rem;
}
#anime-comments .comment-respond {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(33, 165, 154, 0.06) 0%, rgba(33, 165, 154, 0.015) 90px, var(--bg-secondary) 90px);
}
#anime-comments .anime-comment-card > .comment-respond {
    margin-top: 1rem;
    padding: 1rem 0 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}
#anime-comments .anime-comment-form {
    display: grid;
    gap: 1rem;
}
#anime-comments .comment-form-author,
#anime-comments .comment-form-email,
#anime-comments .comment-form-url,
#anime-comments .comment-form-comment,
#anime-comments .comment-form-cookies-consent,
#anime-comments .form-submit {
    margin: 0;
}
#anime-comments .anime-comment-field {
    margin: 0;
}
#anime-comments .logged-in-as,
#anime-comments .comment-notes {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.65;
}
#anime-comments .logged-in-as a,
#anime-comments .comment-notes a {
    color: var(--accent);
    font-weight: 600;
}
#anime-comments .comment-form label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-bright);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#anime-comments .comment-form .form-control {
    min-height: 48px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
#anime-comments .comment-form textarea.form-control {
    min-height: 190px;
    resize: vertical;
}
#anime-comments .comment-form .form-control:focus {
    outline: none;
    border-color: rgba(33, 165, 154, 0.42);
    box-shadow: 0 0 0 4px rgba(33, 165, 154, 0.12);
    background: rgba(255, 255, 255, 0.045);
}
#anime-comments .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}
#anime-comments .comment-form-cookies-consent label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
}
#anime-comments .anime-comment-submit {
    min-height: 46px;
    padding-inline: 1.35rem;
    border-radius: var(--radius-full);
    font-weight: 700;
}
#anime-comments .anime-comment-form__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}
#anime-comments #cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}
#anime-comments #cancel-comment-reply-link:hover {
    color: var(--text-bright);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}
#anime-comments .alert {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .anime-detail-hero__inner {
        padding-bottom: 2.5rem;
    }
    .anime-detail-shell {
        grid-template-columns: 1fr;
    }
    .anime-detail-sidebar {
        position: static;
        order: 1;
        margin-top: -2.5rem;
    }
    .anime-detail-main {
        order: 2;
    }
    #anime-subtitles {
        margin-top: 0.45rem;
    }
}

@media (max-width: 768px) {
    .anime-detail-hero__inner,
    .anime-detail-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .anime-detail-hero__inner {
        padding-top: 1.75rem;
        padding-bottom: 2rem;
    }
    .anime-detail-hero__title {
        max-width: none;
        font-size: 2rem;
    }
    .anime-detail-hero__summary {
        font-size: 0.88rem;
    }
    .anime-detail-sidebar {
        margin-top: 0;
    }
    .anime-panel,
    .anime-panel--hero {
        border-radius: 6px;
        padding: 1.15rem;
    }
    .anime-panel__header,
    .anime-panel__header--wide,
    .anime-panel__actions {
        align-items: flex-start;
    }
    .anime-panel__header,
    .anime-panel__header--wide {
        flex-direction: column;
    }
    .anime-community-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 18px;
    }
    .anime-community-tab {
        justify-content: center;
    }
    .anime-community-pane__head,
    .anime-review-guest__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .anime-review-card,
    .anime-thread-card {
        padding: 1rem;
    }
    .anime-review-card__identity {
        align-items: flex-start;
    }
    #anime-comments .comment-respond,
    #anime-comments .anime-comment-card {
        padding: 1rem;
    }
    #anime-comments .anime-comment-card__head,
    #anime-comments .anime-comment-card__author-block,
    #anime-comments .anime-comment-form__footer {
        flex-direction: column;
        align-items: flex-start;
    }
    #anime-comments .anime-comment-card__toolbar {
        width: 100%;
        justify-content: flex-start;
    }
    #anime-comments .children {
        margin-left: 1rem;
    }
}

/* Subtitle List */
.sub-list { display: flex; flex-direction: column; gap: 8px; }
.sub-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius);
    background: var(--bg-secondary); border: 1px solid transparent;
    transition: all 0.15s;
}
.sub-item:hover { border-color: var(--border-light); background: var(--bg-hover); }
.sub-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.sub-info { flex: 1; min-width: 0; }
.sub-title {
    font-size: 0.9rem; font-weight: 700; color: var(--text-bright);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.sub-title a { color: var(--text-bright); }
.sub-title a:hover { color: var(--accent); }
.sub-fansub { color: var(--accent); font-weight: 700; }
.sub-fansub:hover { text-decoration: underline; }
.sub-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; font-weight: 600;
}
.sub-meta i { margin-right: 3px; }
.sub-arrow {
    color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0;
    transition: color 0.15s;
}
.sub-item:hover .sub-arrow { color: var(--accent); }

/* Pagination */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; margin-top: 2rem;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px;
    border-radius: var(--radius); font-size: 0.82rem; font-weight: 700;
    color: var(--text-secondary); background: var(--bg-card);
    border: 1px solid var(--border); transition: all 0.15s;
}
.pagination a:hover { background: var(--bg-hover); color: var(--text-bright); }
.pagination .current {
    background: var(--accent); color: var(--accent-contrast);
    border-color: var(--accent);
}
.pagination .dots { background: none; border: none; color: var(--text-muted); }

/* Comments */
.comment {
    padding: 14px; border-radius: var(--radius);
    background: var(--bg-secondary); border: 1px solid var(--border);
    margin-bottom: 10px;
}
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comment-user a { color: var(--accent); font-weight: 700; font-size: 0.88rem; }
.comment-user a:hover { text-decoration: underline; }
.comment-date { margin-left: auto; color: var(--text-muted); font-size: 0.75rem; font-weight: 600; }
.comment-body { font-size: 0.88rem; line-height: 1.65; color: var(--text-primary); }

/* Alert Messages */
.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: 0.88rem; font-weight: 600; margin-bottom: 1rem;
}
.alert-success { background: rgba(76,202,81,0.1); border: 1px solid var(--green); color: var(--green); }
.alert-error { background: rgba(232,93,117,0.1); border: 1px solid var(--red); color: var(--red); }
.alert-info { background: var(--accent-surface); border: 1px solid var(--accent); color: var(--accent); }
.alert-warning { background: rgba(247,154,99,0.1); border: 1px solid var(--orange); color: var(--orange); }

/* Empty State */
.empty-state {
    text-align: center; padding: 3rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--text-bright); font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.88rem; }

/* Loading Spinner */
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   SUBSOURCE LAYOUT & COMPONENTS
   ============================================================= */

/* --- SEARCH DROPDOWN --- */
.header-search { position: relative; }
.ss-search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 8px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; z-index: 10002;
    display: none; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.header-search:focus-within .ss-search-dropdown { display: block; }
.ss-search-tabs {
    display: flex; border-bottom: 1px solid var(--border);
}
.ss-search-tab {
    flex: 1; text-align: center; padding: 12px 0;
    font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    cursor: pointer; transition: 0.1s;
}
.ss-search-tab.active {
    color: var(--accent); border-bottom: 2px solid var(--accent);
}
.ss-search-content {
    padding: 20px; background: var(--bg-secondary);
}
.ss-search-placeholder {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; color: var(--text-muted);
    font-size: 0.85rem; padding: 20px 0;
}

/* --- MODALS (LOGIN / REGISTER) --- */
.ss-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 11, 14, 0.85); z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.2s;
}
.ss-modal-overlay.show {
    opacity: 1; visibility: visible;
}
.ss-modal {
    background: var(--bg-card); border-radius: var(--radius-lg);
    width: 100%; max-width: 440px; padding: 30px;
    position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transform: translateY(20px); transition: 0.2s;
    border: 1px solid var(--border);
}
.ss-modal-overlay.show .ss-modal { transform: translateY(0); }
.ss-modal-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
}
.ss-modal-close:hover { color: var(--text-bright); }
.ss-modal-title {
    color: var(--accent); font-size: 1.4rem; font-weight: 700;
    margin-bottom: 4px; line-height: 1.2;
}
.ss-modal-subtitle {
    color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px;
}
.ss-auth-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -6px 0 18px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(76, 202, 81, 0.1);
    border: 1px solid rgba(76, 202, 81, 0.35);
    color: var(--green);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.5;
}
.ss-auth-success i {
    margin-top: 2px;
    flex-shrink: 0;
}
.ss-auth-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -6px 0 18px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(255, 91, 91, 0.1);
    border: 1px solid rgba(255, 91, 91, 0.28);
    color: #ff9a9a;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.5;
}
.ss-auth-error i {
    margin-top: 2px;
    flex-shrink: 0;
}
.ss-form-group { margin-bottom: 16px; text-align: left; }
.ss-form-group label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-bright); margin-bottom: 6px;
}
.ss-form-group input[type="text"],
.ss-form-group input[type="email"],
.ss-form-group input[type="password"] {
    width: 100%; padding: 12px 14px; border-radius: var(--radius);
    background: var(--bg-primary); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 0.9rem;
    font-family: inherit; outline: none; transition: 0.1s;
}
.ss-form-group input:focus { border-color: var(--text-muted); }
.ss-input-wrapper { position: relative; }
.ss-input-wrapper input { padding-right: 52px; }
.ss-pwd-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; padding: 0;
    border-radius: 999px; background: transparent;
    color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.1s, background 0.1s;
}
.ss-pwd-toggle:hover,
.ss-pwd-toggle:focus-visible {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.06);
}
.ss-pwd-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.ss-cf-placeholder {
    background: transparent; border: 1px solid var(--border);
    padding: 12px; border-radius: var(--radius); font-size: 0.8rem;
    color: var(--text-primary); margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.ss-turnstile-widget {
    min-height: 66px;
}
.ss-turnstile-widget iframe {
    max-width: 100%;
}
.ss-turnstile-status {
    margin-top: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #ff9a7a;
}
.ss-turnstile-status[hidden] {
    display: none;
}
.ss-btn-primary {
    width: 100%; background: var(--accent); color: var(--accent-contrast);
    border: none; border-radius: var(--radius); padding: 14px;
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    transition: 0.1s; margin-bottom: 16px;
}
.ss-btn-primary:hover { background: var(--accent-dark); }
.ss-modal-footer {
    text-align: center; font-size: 0.85rem; color: var(--text-muted);
}
.ss-modal-footer a { color: var(--text-secondary); text-decoration: none; transition: 0.1s;}
.ss-modal-footer a:hover { color: var(--text-bright); }
.ss-checkbox-group {
    display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 0.8rem; color: var(--text-bright);
}
.ss-checkbox-group input[type="checkbox"] {
    margin-top: 3px;
}

/* --- HOMEPAGE LAYOUT --- */
.ss-layout {
    display: flex;
    gap: 20px;
    margin-top: 2rem;
    margin-bottom: 3rem;
}
.ss-main-col {
    flex: 1;
    min-width: 0;
}
.ss-side-col {
    width: 320px;
    flex-shrink: 0;
}
@media (max-width: 900px) {
    .ss-layout { flex-direction: column; }
    .ss-side-col { width: 100%; }
}

/* --- USER PROFILE LAYOUT --- */
.ss-user-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.ss-user-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid #ccc;
    object-fit: cover;
}
.ss-user-info h1 {
    font-size: 1.5rem; font-weight: 700; color: var(--text-bright);
    margin-bottom: 10px; margin-top: 0;
}
.ss-user-info .ss-badge-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; background: rgba(255,255,255,0.1);
    border-radius: 50%; color: var(--text-bright); font-size: 0.8rem;
}
.ss-user-subs-header {
    background: var(--bg-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 15px 20px; display: flex; justify-content: space-between;
    font-size: 0.85rem; color: var(--text-bright); font-weight: 700;
    border-bottom: 1px solid var(--border);
}
.ss-user-subs-header .text-green { color: #10b981; font-weight: 600; margin-left: 5px; }
.ss-user-subs-header .subs-ratings { color: var(--text-muted); font-weight: 500; }
.ss-user-subs-grid {
    background: var(--bg-card); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}
.ss-user-sub-card {
    background: var(--bg-primary); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; color: inherit; display: block;
}
.ss-user-sub-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(33, 165, 154, 0.14) 0%, rgba(33, 165, 154, 0.04) 100%),
        var(--bg-hover);
}
.ss-user-sub-poster img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.ss-user-sub-poster-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.12);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.ss-user-sub-poster.is-empty .ss-user-sub-poster-icon {
    opacity: 1;
}
.ss-user-sub-poster.is-empty::after {
    content: attr(data-title);
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.ss-user-sub-meta {
    padding: 10px; font-size: 0.75rem; color: var(--text-muted);
}
.ss-user-sub-title {
    color: var(--text-bright); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}

/* SIDE COL WIDGETS */
.ss-widget {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 20px; margin-bottom: 20px;
}
.ss-widget-title {
    font-size: 1rem; font-weight: 700; color: var(--text-bright);
    margin: 0 0 15px 0; border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.ss-details-list {
    list-style: none; padding: 0; margin: 0 0 20px 0;
}
.ss-details-list li {
    font-size: 0.85rem; color: var(--text-muted);
    margin-bottom: 15px; display: flex; align-items: center; gap: 10px;
}
.ss-btn-secondary {
    display: block; width: 100%; background: var(--bg-hover);
    color: var(--text-bright); border: none; padding: 12px;
    border-radius: var(--radius); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; text-align: left; margin-bottom: 10px;
    text-decoration: none;
    transition: 0.1s;
}
.ss-btn-secondary i { width: 20px; text-align: center; margin-right: 5px; opacity: 0.7; }
.ss-btn-secondary:hover { background: var(--bg-secondary); }
.ss-profile-bio-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ss-profile-bio-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ss-profile-bio-section + .ss-profile-bio-section {
    padding-top: 2px;
}
.ss-bio-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}
.ss-social-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.ss-profile-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.ss-profile-socials a {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; background: var(--bg-hover);
    border-radius: var(--radius); color: var(--text-muted); transition: 0.1s;
    border: 1px solid var(--border);
}
.ss-profile-socials a:hover { color: var(--text-bright); background: var(--bg-secondary); }
.ss-profile-support-section {
    margin-top: 2px;
}
.ss-profile-support-btn {
    margin: 0;
}

/* REPORT MODAL SPECIFICS */
.ss-report-option {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 15px; margin-bottom: 10px; cursor: pointer;
    transition: 0.1s; display: block;
}
.ss-report-option input { display:none;}
.ss-report-option h4 { margin: 0 0 4px 0; color: var(--text-bright); font-size: 0.95rem; }
.ss-report-option p { margin: 0; color: var(--text-muted); font-size: 0.8rem; }
.ss-report-option:hover { background: var(--bg-hover); }
.ss-report-option:has(input:checked) {
    border-color: var(--accent); background: rgba(33, 165, 154, 0.05);
}
.ss-report-textarea {
    width: 100%; background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 15px; color: var(--text-bright);
    font-family: inherit; font-size: 0.85rem; resize: vertical; min-height: 80px;
    margin-top: 5px; outline: none; display: none;
}
.ss-report-option:has(input:checked) ~ .ss-report-textarea { display: block; }
.ss-report-textarea:focus { border-color: var(--text-muted); }

/* --- DASHBOARD STYLES --- */
.ss-dash-tab {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; border-radius: var(--radius-lg);
    color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
    text-decoration: none; transition: 0.2s;
}
.ss-dash-tab i {
    width: 20px; text-align: center;
}
.ss-dash-tab:hover {
    color: var(--text-bright); background: var(--bg-hover);
}
.ss-dash-tab.active {
    background: rgba(33, 165, 154, 0.1);
    color: var(--accent);
}
.ss-dash-pane {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- SINGLE SUBTITLE LAYOUT --- */
.ss-single-layout {
    display: flex;
    gap: 24px;
    margin-top: 1rem;
    align-items: flex-start;
}
.ss-single-left {
    width: 280px;
    flex-shrink: 0;
}
.ss-single-middle {
    flex: 1;
    min-width: 0;
}
.ss-single-right {
    width: 320px;
    flex-shrink: 0;
}
.ss-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text-bright);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}
.ss-back-link:hover {
    color: var(--accent);
}
.ss-poster-shell {
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.ss-side-stats {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.ss-score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.ss-score-card-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ss-score-card-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 10px;
}
.ss-score-number {
    font-size: 2rem;
    font-weight: 800;
    color: #f6c94c;
    line-height: 1;
}
.ss-score-number--accent {
    color: var(--accent);
}
.ss-score-scale {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.ss-side-link,
.ss-side-copy {
    display: inline-flex;
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.ss-side-link {
    text-decoration: none;
}
.ss-side-link:hover {
    color: var(--accent);
}
.ss-mini-comments-card {
    position: relative;
    padding: 18px;
    overflow: hidden;
    box-shadow: none;
}
.ss-single-right .ss-mini-comments-card {
    margin-top: 20px;
}
.ss-mini-comments-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.ss-mini-comments-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ss-mini-comments-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--accent-surface);
    color: var(--accent);
    font-size: 0.95rem;
}
.ss-mini-comments-title {
    color: var(--text-bright);
    font-size: 1.02rem;
    font-weight: 800;
}
.ss-mini-comments-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: var(--accent-surface);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
}
.ss-mini-comments-sort {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.ss-mini-comments-sort:hover {
    border-color: rgba(33, 165, 154, 0.28);
}
.ss-mini-comments-sort i {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.ss-mini-comments-sort-select {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    padding-right: 18px;
    outline: none;
    cursor: pointer;
}
.ss-mini-comments-sort-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}
.ss-mini-comments-compose {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}
.ss-mini-comments-list {
    display: grid;
    gap: 0;
    margin-top: 0;
}
.ss-mini-comment {
    display: block;
}
.ss-mini-comment + .ss-mini-comment {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.ss-mini-comment-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.ss-mini-comment-avatar .avatar,
.ss-mini-comment-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    object-fit: cover;
    display: block;
}
.ss-mini-comment-body {
    min-width: 0;
    flex: 1;
}
.ss-mini-comment-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.ss-mini-comment-author-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ss-mini-comment-author {
    color: var(--text-bright);
    font-size: 0.95rem;
    font-weight: 700;
}
.ss-mini-comment-date {
    color: var(--text-muted);
    font-size: 0.76rem;
}
.ss-mini-comment-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.ss-mini-comment-bubble {
    margin-top: 8px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}
.ss-mini-comment-text,
.ss-mini-comments-empty,
.ss-mini-comments-guest-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}
.ss-mini-comment-form-wrap,
.ss-mini-comments-guest {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.ss-mini-comments-form-label {
    display: none;
}
.ss-mini-comment-form {
    margin-top: 0;
}
.ss-mini-comment-form .logged-in-as,
.ss-mini-comment-form .comment-notes,
.ss-mini-comment-form .form-submit {
    display: none;
}
.ss-mini-comment-field {
    margin: 0;
}
.ss-mini-comment-field label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.ss-mini-comment-field .screen-reader-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 0.55rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
.ss-mini-comment-form textarea.form-control {
    min-height: 96px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    resize: vertical;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.ss-mini-comment-form textarea.form-control:focus {
    outline: none;
    border-color: rgba(33, 165, 154, 0.36);
    box-shadow: 0 0 0 3px rgba(33, 165, 154, 0.12);
}
.ss-mini-comment-form textarea.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}
.ss-mini-comment-submit-row {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}
.ss-mini-comment-submit {
    min-width: 150px;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
    box-shadow: none;
}
.ss-mini-comment-submit:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.ss-mini-comments-guest-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    justify-content: center;
}
.ss-mini-comments-register {
    min-width: 150px;
    justify-content: center;
}
.ss-mini-comments-login {
    color: var(--text-bright);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
}
.ss-mini-comments-login:hover {
    color: var(--accent);
}
.ss-mini-comments-guest-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.6;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.ss-mini-comments-guest-message:hover {
    border-color: rgba(33, 165, 154, 0.28);
    color: var(--text-bright);
    box-shadow: 0 0 0 3px rgba(33, 165, 154, 0.08);
}
.ss-mini-comments-empty--center {
    padding: 10px 0 2px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
@media (max-width: 560px) {
    .ss-mini-comments-head {
        align-items: flex-start;
    }
    .ss-mini-comment-submit {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .ss-single-layout { display: flex; flex-direction: column; }
    .ss-single-left, .ss-single-right, .ss-single-middle { display: contents; }
    
    .ss-back-link { order: 1; margin-bottom: 10px; width: 100%; }
    .ss-desktop-poster { display: none !important; }
    .ss-mobile-poster { display: block !important; }
    
    .ss-subtitle-hero-card { order: 2; width: 100%; padding: 20px; }
    .ss-side-stats { order: 3; width: 100%; display: flex; gap: 15px; margin-bottom: 20px; margin-top: 10px; }
    .ss-side-stats .ss-score-card { flex: 1; margin: 0; }
    
    .ss-details-box { order: 4; width: 100%; margin-bottom: 20px; }
    .ss-rating-panel { order: 5; width: 100%; margin-bottom: 20px; }
    .ss-mini-comments-card { order: 6; width: 100%; }

    .ss-subtitle-hero-head { align-items: center; justify-content: flex-start; }
    .ss-subtitle-title { font-size: 1.4rem; }
    .ss-subtitle-meta { margin-top: 15px; margin-bottom: 15px; }
    
    .ss-details-grid { grid-template-columns: 1fr 1fr !important; gap: 12px; }
    .ss-primary-actions { flex-direction: column; align-items: stretch; text-align: center; }
    .ss-primary-actions .btn { width: 100%; justify-content: center; }
    .ss-release-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ss-release-row { word-break: break-all; }
}

@media (max-width: 560px) {
    .ss-details-grid { grid-template-columns: 1fr !important; }
}

.ss-movie-poster {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
    display: block;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}
.ss-subtitle-hero-card,
.ss-details-box,
.ss-rating-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.ss-subtitle-hero-card {
    padding: 24px;
}
.ss-subtitle-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.ss-subtitle-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.ss-subtitle-title {
    margin: 0;
    color: var(--text-bright);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}
.ss-anilist-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(33, 165, 154, 0.12);
    border: 1px solid rgba(33, 165, 154, 0.24);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.ss-anilist-pill--muted {
    color: var(--text-secondary);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.ss-subtitle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 14px;
}
.ss-subtitle-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
}
.ss-subtitle-meta-item i {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.ss-release-header {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ss-release-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ss-release-row {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-family: monospace;
    font-size: 0.84rem;
    color: var(--text-bright);
    border: 1px solid var(--border);
    line-height: 1.6;
    word-break: break-word;
}
.ss-notes-box {
    margin-top: 18px;
    padding: 16px 18px;
    background: rgba(33, 165, 154, 0.07);
    border: 1px solid rgba(33, 165, 154, 0.16);
    border-radius: var(--radius);
    color: var(--text-secondary);
}
.ss-notes-box > *:first-child {
    margin-top: 0;
}
.ss-notes-box > *:last-child {
    margin-bottom: 0;
}
.ss-primary-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.ss-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: var(--radius);
    background: #22c55e;
    border: none;
    color: #fff;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.24);
}
.ss-download-btn:hover {
    filter: brightness(1.05);
}
.ss-secondary-link,
.ss-inline-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    padding: 9px 12px;
    cursor: pointer;
}
.ss-secondary-link:hover,
.ss-inline-action:hover {
    color: var(--accent);
    border-color: rgba(33, 165, 154, 0.24);
}
.ss-details-box {
    padding: 24px;
    margin-top: 20px;
}
.ss-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.ss-card-head h3 {
    margin: 0;
    color: var(--text-bright);
    font-size: 1.06rem;
}
.ss-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.ss-detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 15px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.ss-detail-item--wide {
    grid-column: 1 / -1;
}
.ss-detail-label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.ss-detail-value {
    color: var(--text-bright);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}
.ss-detail-uploader {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ss-detail-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    object-fit: cover;
}
.ss-detail-uploader-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ss-detail-link {
    color: var(--text-bright);
    text-decoration: none;
}
.ss-detail-link:hover {
    color: var(--accent);
}
.ss-detail-subcopy {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}
.ss-rating-panel {
    padding: 24px;
}
.ss-rating-panel-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ss-rating-eyebrow {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.ss-rating-panel-score {
    color: var(--text-bright);
    font-size: 1.55rem;
    font-weight: 800;
}
.ss-rating-panel-copy {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}
.stars-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}
.star-item {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.star-item:hover,
.star-item:focus-visible,
.star-item.is-active {
    color: #f6c94c;
    border-color: rgba(246, 201, 76, 0.26);
    background: rgba(246, 201, 76, 0.06);
    transform: translateY(-1px);
}
.ss-rating-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-bright);
    font-size: 0.88rem;
    font-weight: 700;
}
.ss-rating-login-note {
    margin-top: 14px;
    color: var(--red);
    font-size: 0.8rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .ss-subtitle-hero-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .ss-details-grid {
        grid-template-columns: 1fr;
    }
}
.ss-comment-single { border-top: 1px solid var(--border); padding: 15px 0; }
.ss-comment-single:first-child { border-top: none; }
.ss-comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ss-comment-author img { width: 32px; height: 32px; border-radius: 50%; }
.ss-comment-text { font-size: 0.85rem; color: var(--text-bright); line-height: 1.5; margin-bottom: 10px; }
.ss-comment-actions { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 15px; }

/* HEADER DROPDOWNS & PILLS */
.ss-header-pill {
    background: var(--accent); color: var(--accent-contrast);
    font-size: 0.8rem; font-weight: 700; padding: 5px 12px;
    border-radius: 20px; text-decoration: none; transition: 0.1s;
}
.ss-header-pill:hover { background: var(--accent-dark); color: var(--accent-contrast); }

.ss-header-dropdown-menu {
    position: absolute; top: 100%; right: 0; margin-top: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 260px; z-index: 10003; display: none; overflow: hidden;
}
.dropdown.show > .ss-header-dropdown-menu { display: block; animation: fadeIn 0.2s; }
.ss-dropdown-item {
    display: block; padding: 12px 20px; color: var(--text-bright);
    text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: 0.1s; border-bottom: 1px solid var(--border);
}
.ss-dropdown-item:hover { background: var(--bg-hover); color: var(--text-bright); }
.ss-dropdown-item:last-child { border-bottom: none; }

.ss-notification-trigger {
    position: relative;
}
.ss-notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ss-notif-tab {
    flex: 1; text-align: center; padding: 10px 0; font-size: 0.85rem;
    color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
    background: none; border-left: none; border-right: none; border-top: none;
    font-family: inherit;
    transition: 0.2s;
}
.ss-notif-tab.active {
    color: var(--accent); border-bottom: 2px solid var(--accent);
}
.ss-notification-list {
    display: flex;
    flex-direction: column;
    padding: 0;
}
.ss-notification-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
}
.ss-notification-item:last-child {
    border-bottom: none;
}
.ss-notification-item:hover {
    background: rgba(255, 255, 255, 0.02);
}
.ss-notification-item.is-unread {
    background: linear-gradient(90deg, rgba(33, 165, 154, 0.14) 0, rgba(33, 165, 154, 0.14) 3px, transparent 3px);
}
.ss-notification-item-media {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}
.ss-notification-item-avatar,
.ss-notification-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.ss-notification-item-avatar {
    object-fit: cover;
    display: block;
}
.ss-notification-item-icon {
    background: rgba(33, 165, 154, 0.14);
    color: var(--accent);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ss-notification-item-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ss-notification-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.ss-notification-item-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ss-notification-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss-notification-item-excerpt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.ss-notification-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ss-notification-item-label {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.ss-notification-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.ss-notification-item-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}
.ss-notification-item-state.is-unread {
    background: rgba(33, 165, 154, 0.14);
    color: var(--accent);
}
.ss-notification-item-state.is-read {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}
.ss-notification-item-badge {
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(33, 165, 154, 0.18);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
}
#header-notifications-menu .ss-notification-item-status {
    gap: 0;
}
#header-notifications-menu .ss-notification-item-state {
    display: none;
}
.ss-notification-item-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(33, 165, 154, 0.12);
    flex-shrink: 0;
}
.ss-notification-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.ss-dashboard-notifications {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ss-dashboard-notification-panes {
    flex: 1;
    min-height: 0;
}
.ss-dashboard-notification-panes .ss-notif-pane {
    height: 100%;
    overflow-y: auto;
}
.ss-dashboard-notification-panes .ss-notification-empty {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ss-dashboard-mark-read:hover {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.ss-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--accent); /* Subsource uses an accent colored border underneath titles */
    display: flex;
    justify-content: space-between;
}
.ss-section-title > span.owner {
    font-size: 0.8rem;
    color: var(--text-bright);
}

/* Popular Cards */
.ss-pop-card {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}
.ss-pop-poster {
    width: 140px;
    flex-shrink: 0;
    position: relative;
}
.ss-pop-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.ss-pop-details {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.ss-pop-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 12px;
}
.ss-pop-subs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.ss-pop-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(33, 165, 154, 0.06);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.ss-pop-sub-item:hover {
    border-color: rgba(33, 165, 154, 0.24);
    background: rgba(33, 165, 154, 0.1);
    transform: translateX(2px);
}
.ss-pop-sub-item--empty {
    color: var(--text-muted);
}
.ss-pop-sub-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(33, 165, 154, 0.14);
    color: var(--accent);
    font-size: 0.76rem;
}
.ss-pop-sub-text {
    min-width: 0;
    flex: 1;
    color: inherit;
    font-weight: 600;
}
.ss-pop-sub-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: color 0.18s ease, transform 0.18s ease;
}
.ss-pop-sub-item:hover .ss-pop-sub-text {
    color: var(--text-primary);
}
.ss-pop-sub-item:hover .ss-pop-sub-arrow {
    color: var(--accent);
    transform: translateX(2px);
}
.ss-pop-downloads {
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Recent Subtitles Table */
.ss-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.ss-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}
.ss-table tr {
    transition: background 0.15s ease;
}
.ss-table th {
    background: var(--accent);
    color: var(--text-bright);
    font-weight: 600;
    padding: 10px 14px;
}
.ss-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.ss-table tr:nth-child(even) {
    background: var(--bg-hover);
}
.ss-table tr:hover {
    background: var(--accent-surface);
}
.ss-table td.title {
    color: var(--text-bright);
    font-weight: 500;
}

/* News Sidebar */
.ss-news-card {
    background: rgba(255,255,255,0.03); /* slight transparency acting like a gradient on the right in some contexts */
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.02);
}
.ss-news-card:hover {
    background: rgba(255,255,255,0.05);
}
.ss-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.ss-news-info {
    flex: 1;
}
.ss-news-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ss-news-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.ss-news-meta span {
    color: var(--accent);
}
.ss-news-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: 0.2s;
}
.ss-news-card:hover .ss-news-toggle {
    background: rgba(255,255,255,0.1);
    color: var(--text-bright);
}
.ss-news-body {
    display: none;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.ss-news-body a {
    color: var(--accent);
    text-decoration: none;
}
.ss-news-body a:hover {
    text-decoration: underline;
}
.ss-news-body ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}
.ss-news-body ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}
.ss-news-body ul li::before {
    content: "◆";
    position: absolute;
    left: 0;
    color: #f43f5e; /* Red-pink diamond bullet matching screenshot */
    font-size: 0.7rem;
    top: 2px;
}
/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
    .container { padding: 0 1rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .page-layout { grid-template-columns: 1fr; }
    .hide-tablet { display: none; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .header-bar { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
    .header-logo { order: 1; flex: 1; }
    .header-actions { order: 2; gap: 14px; align-items: center; }
    .header-actions .dropdown[style], .theme-toggle-header[style] { margin-right: 0 !important; }
    .theme-toggle-header { margin-left: 0 !important; transform: scale(0.9); transform-origin: right center; border: none; background: transparent; padding: 0; }
    .ss-notification-trigger { font-size: 1.4rem !important; }
    .ss-header-pill { display: none !important; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; margin-top: 5px; }
    .header-nav { display: none; flex-basis: 100%; order: 4; flex-direction: column; width: 100%; background: var(--bg-card); border-radius: var(--radius); padding: 10px; margin-top: 10px; border: 1px solid var(--border); }
    .header-nav.show { display: flex !important; }
    .header-nav-ul { flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
    .header-nav-ul li { width: 100%; }
    .header-nav-ul li a { display: block; width: 100%; padding: 10px 16px; font-size: 0.9rem; border-left: 3px solid transparent; }
    .header-nav-ul li a:hover { border-left-color: var(--accent); background: var(--bg-hover); }
    .main-nav { display: none; border-top: 1px solid var(--border); }
    .main-nav.active { display: block; }
    .nav-list { flex-direction: column; padding: 8px 0; }
    .nav-link {
        width: 100%; border-bottom: none;
        border-left: 3px solid transparent; padding: 10px 16px; font-size: 0.9rem;
    }
    .nav-link:hover, .nav-link.active {
        border-bottom: none; border-left-color: var(--accent); background: var(--bg-hover);
    }
    .btn-upload-nav { margin: 8px 16px; justify-content: center; }
    .hide-mobile { display: none !important; }
    .header-nav.hide-mobile.show { display: flex !important; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-stats { flex-wrap: wrap; }
    .hero-content { flex-direction: column; align-items: center; text-align: center; padding: 2rem 1.5rem; }
    .hero-poster { width: 150px; }
    .hero-info { align-items: center; }
    .hero-pills, .hero-genres, .hero-actions { justify-content: center; }
    .hero-title { font-size: 1.5rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .hero-poster { width: 120px; }
    .anime-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .theme-toggle-header .theme-btn { width: 30px; height: 30px; }
}

/* Upload Overlay */
.anime-card .upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 17, 20, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 20;
    padding: 1rem;
}
.anime-card:hover .upload-overlay {
    opacity: 1;
}
.anime-card .upload-overlay .btn-accent {
    transform: translateY(10px);
    transition: transform 0.2s ease;
    width: 100%;
    font-size: 0.85rem;
}
.anime-card:hover .upload-overlay .btn-accent {
    transform: translateY(0);
}

/* Add New Title Tabs */
.tabs-container {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
    gap: 2rem;
}
.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem 1rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.tab-btn:hover { color: var(--text-bright); }
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Grid forms */
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .form-grid { grid-template-columns: 1fr; } }
  
/* News Accordion */
.news-widget {
    background: transparent;
}
.news-header {
    background: transparent;
    padding: 15px 0;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    border-bottom: 1px solid var(--accent);
}
.news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.news-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: background 0.2s ease;
}
.news-item:hover {
    background: var(--bg-hover);
}
.news-item.active {
    background: var(--bg-secondary); /* Subtle accent highlight for open items */
}
.news-header-strip {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.news-title-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.news-title {
    font-weight: 600;
    color: var(--text-bright);
    font-size: 1.05rem;
}
.news-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.news-meta .news-author {
    color: var(--accent);
}
.news-toggle {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.news-item:hover .news-toggle {
    background: var(--bg-hover);
}
.news-toggle i {
    transition: transform 0.3s ease;
}
.news-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.news-content {
    padding: 0 15px 20px 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}
.news-content p {
    margin-bottom: 10px;
}
.news-content p:last-child {
    margin-bottom: 0;
}
.news-content a {
    color: var(--accent);
    text-decoration: underline;
}
.news-feed-thumb {
    margin-bottom: 14px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    aspect-ratio: 16 / 9;
}
.news-feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}
.news-content p {
    overflow-wrap: anywhere;
}
.diamond-list {
    list-style: none;
    padding-left: 15px;
    margin: 10px 0;
}
.diamond-list li {
    position: relative;
    margin-bottom: 6px;
    padding-left: 15px;
}
.diamond-list li::before {
    content: '◆';
    position: absolute;
    left: -15px;
    color: var(--red); /* As seen in the screenshot */
    font-size: 0.8rem;
}

/* ── Language & Notification Dropdowns ─────────────────────────── */
.ss-header-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: hidden;
}
.ss-header-dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.ss-header-dropdown-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ss-header-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* =============================================================
   MOBILE: NOTIFICATION DROPDOWN
   ============================================================= */
@media (max-width: 768px) {
    #header-notifications-menu {
        position: fixed !important;
        top: 75px !important;
        left: 15px !important;
        right: 15px !important;
        bottom: auto !important;
        width: auto !important;
        max-width: none !important;
        max-height: 75vh !important;
        margin: 0 !important;
        border-radius: var(--radius-lg) !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
        z-index: 999999 !important;
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
    }
    #header-notifications-menu:not(.show) {
        display: none !important;
    }
    #header-notifications-menu > div:first-child {
        flex-shrink: 0;
        padding: 16px 20px !important;
    }
    #header-notifications-menu .ss-notif-tabs {
        flex-shrink: 0;
    }
    #header-notifications-menu .ss-notif-tab {
        font-size: 0.8rem;
        padding: 10px 4px;
        white-space: nowrap;
    }
    #header-notifications-menu .ss-notif-pane {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #header-notifications-menu .ss-notification-item {
        padding: 14px 16px;
        gap: 10px;
    }
    #header-notifications-menu .ss-notification-item-title {
        font-size: 0.82rem;
    }
    #header-notifications-menu .ss-notification-item-excerpt {
        font-size: 0.78rem;
    }
}

/* =============================================================
   MOBILE: SUBTITLE SINGLE PAGE
   ============================================================= */
@media (max-width: 1100px) {
    /* Scores always side by side */
    .ss-side-stats {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        flex-direction: unset !important;
        gap: 12px !important;
    }
    .ss-side-stats .ss-score-card {
        flex: unset !important;
        min-width: 0;
    }

    /* Rating panel compact on mobile */
    .ss-rating-panel {
        order: 4 !important;
        margin-bottom: 16px;
    }

    /* Subtitle details after rating */
    .ss-details-box {
        order: 5 !important;
    }

    /* Comments last */
    .ss-mini-comments-card {
        order: 6 !important;
    }
}

@media (max-width: 560px) {
    /* Keep scores side by side on small screens too */
    .ss-side-stats {
        flex-direction: row !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .ss-side-stats .ss-score-card {
        padding: 14px;
    }
    .ss-side-stats .ss-score-number {
        font-size: 1.6rem;
    }
    .ss-side-stats .ss-score-scale {
        font-size: 0.75rem;
    }
    .ss-side-stats .ss-score-card-label {
        font-size: 0.7rem;
    }
    .ss-side-stats .ss-side-link,
    .ss-side-stats .ss-side-copy {
        font-size: 0.75rem;
    }

    /* Subtitle details: collapsible with max-height */
    .ss-details-box {
        position: relative;
    }
    .ss-details-box .ss-details-grid {
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
        padding-bottom: 8px;
        mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
        transition: max-height 0.35s ease, mask-image 0.35s ease;
    }
    .ss-details-box .ss-details-grid::-webkit-scrollbar {
        width: 4px;
    }
    .ss-details-box .ss-details-grid::-webkit-scrollbar-track {
        background: transparent;
    }
    .ss-details-box .ss-details-grid::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }
    .ss-details-box.is-expanded .ss-details-grid {
        max-height: 2000px;
        mask-image: none;
        -webkit-mask-image: none;
    }

    /* Rating panel compact */
    .ss-rating-panel {
        padding: 18px;
    }
    .ss-rating-panel-score {
        font-size: 1.3rem;
    }
    .stars-grid {
        gap: 6px;
        margin-top: 16px;
    }
    .star-item {
        min-height: 42px;
        border-radius: 10px;
        font-size: 1rem;
    }
    .ss-rating-status {
        margin-top: 12px;
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .ss-details-toggle {
        display: block;
        width: 100%;
        margin-top: 10px;
        padding: 10px;
        background: var(--bg-hover);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        color: var(--text-bright);
        font-size: 0.85rem;
        font-weight: 600;
        text-align: center;
        cursor: pointer;
        transition: background 0.2s;
    }
    .ss-details-toggle:hover {
        background: var(--bg-secondary);
    }
    
    /* Hero Card Mobile Redesign */
    .ss-subtitle-hero-head {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 12px !important;
    }
    .ss-mobile-poster {
        width: 150px !important;
        margin-bottom: 5px;
    }
    .ss-subtitle-hero-copy {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ss-subtitle-title {
        font-size: 1.7rem !important;
        line-height: 1.2 !important;
        word-break: break-word;
    }
    .ss-subtitle-meta {
        justify-content: center !important;
    }
}

/* Hide toggle by default on desktop */
.ss-details-toggle {
    display: none;
}

/* =============================================================
   TOOLS PAGES
   ============================================================= */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}
.forum-breadcrumb a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}
.forum-breadcrumb a:hover {
    color: var(--accent);
}
.forum-breadcrumb .sep {
    color: var(--border-light);
    font-size: 0.65rem;
}

.tool-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.tool-page-header {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.4rem;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.tool-page-header .tool-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.tool-page-header h1 {
    margin: 0 0 0.35rem;
    color: var(--text-bright);
    font-size: 1.9rem;
    line-height: 1.08;
    font-weight: 900;
}
.tool-page-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 62ch;
}

.tool-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 220px;
    padding: 2.25rem 1.5rem;
    text-align: center;
    background:
        radial-gradient(circle at top, rgba(33, 165, 154, 0.08), transparent 55%),
        var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.tool-upload-area:hover,
.tool-upload-area.drag-over {
    border-color: var(--accent);
    background:
        radial-gradient(circle at top, rgba(33, 165, 154, 0.14), transparent 58%),
        var(--bg-card);
    transform: translateY(-1px);
}
.tool-upload-area > i:first-child {
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--accent-surface);
    color: var(--accent);
    font-size: 1.45rem;
    margin-bottom: 0.35rem;
}
.tool-upload-area h3 {
    margin: 0;
    color: var(--text-bright);
    font-size: 1.15rem;
    font-weight: 800;
}
.tool-upload-area p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
}

@media (max-width: 768px) {
    .tool-page-header {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .tool-page-header p {
        max-width: none;
    }
    .tool-upload-area {
        min-height: 180px;
        padding: 1.6rem 1rem;
    }
    .tool-page-header h1 {
        font-size: 1.55rem;
    }
}

/* =============================================================
   MODERN HOME REFRESH
   ============================================================= */
:root {
    --modern-glass: rgba(18, 21, 25, 0.78);
    --modern-border: rgba(255, 255, 255, 0.08);
    --modern-shadow: 0 26px 80px rgba(3, 7, 18, 0.42);
    --modern-shadow-soft: 0 18px 44px rgba(3, 7, 18, 0.24);
    --modern-glow: rgba(33, 165, 154, 0.2);
}

body {
    position: relative;
}

.header-root {
    transition:
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        backdrop-filter 0.35s ease;
}

.header-root::after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(33, 165, 154, 0.75), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.header-root.scrolled {
    background: var(--modern-glass);
    border-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 30px rgba(3, 7, 18, 0.35);
}

.header-root.scrolled::after {
    opacity: 1;
}

.header-logo a {
    transition: transform 0.25s ease;
}

.header-logo a:hover {
    transform: translateY(-1px);
}

.search-box {
    height: 42px;
    border-radius: 18px;
    border-color: rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        rgba(17, 19, 24, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease,
        background 0.22s ease;
}

.search-box:focus-within {
    border-color: rgba(33, 165, 154, 0.4);
    box-shadow:
        0 0 0 4px rgba(33, 165, 154, 0.11),
        0 16px 36px rgba(3, 7, 18, 0.28);
    transform: translateY(-1px);
}

.search-box input {
    padding-inline: 16px;
}

.search-btn,
.search-clear {
    width: 42px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.search-clear {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.search-btn:hover,
.search-clear:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.04);
}

.ss-home-hero {
    position: relative;
    padding: 2.4rem 0 1rem;
    overflow: clip;
}

.ss-home-hero::before,
.ss-home-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    pointer-events: none;
    opacity: 0.95;
}

.ss-home-hero::before {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -100px;
    background: radial-gradient(circle, rgba(33, 165, 154, 0.28) 0%, rgba(33, 165, 154, 0) 72%);
    animation: heroFloat 10s ease-in-out infinite;
}

.ss-home-hero::after {
    width: 320px;
    height: 320px;
    left: -120px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0) 72%);
    animation: heroFloat 12s ease-in-out infinite reverse;
}

.ss-home-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 470px);
    gap: 24px;
    align-items: stretch;
}

.ss-home-hero-copy {
    padding: 1rem 0;
}

.ss-home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ss-home-eyebrow i {
    color: var(--accent);
}

.ss-home-title {
    margin: 1rem 0 1rem;
    max-width: 12ch;
    color: var(--text-bright);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.ss-home-description {
    max-width: 62ch;
    color: rgba(234, 234, 234, 0.76);
    font-size: 0.98rem;
    line-height: 1.75;
}

.ss-home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.5rem;
}

.ss-home-cta,
.ss-home-ghost,
.ss-home-feature-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 46px;
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        color 0.25s ease;
}

.ss-home-cta {
    background: linear-gradient(135deg, #33d2c6, #21a59a);
    color: #081816;
    box-shadow: 0 18px 34px rgba(33, 165, 154, 0.25);
}

.ss-home-ghost,
.ss-home-feature-link {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
}

.ss-home-cta:hover,
.ss-home-ghost:hover,
.ss-home-feature-link:hover {
    transform: translateY(-2px);
}

.ss-home-cta:hover {
    box-shadow: 0 24px 42px rgba(33, 165, 154, 0.32);
}

.ss-home-ghost:hover,
.ss-home-feature-link:hover {
    border-color: rgba(33, 165, 154, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.ss-home-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 1.7rem;
}

.ss-home-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 108px;
    padding: 1rem 1rem 1.05rem;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--modern-shadow-soft);
}

.ss-home-stat::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(33, 165, 154, 0.08), transparent 55%);
    pointer-events: none;
}

.ss-home-stat strong,
.ss-home-stat span {
    position: relative;
    z-index: 1;
}

.ss-home-stat strong {
    color: var(--text-bright);
    font-size: 1.45rem;
    line-height: 1;
}

.ss-home-stat span:last-child {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.ss-home-stat-icon {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(33, 165, 154, 0.14);
    color: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ss-home-marquee {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.4rem;
}

.ss-home-marquee-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.ss-home-marquee-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(33, 165, 154, 0.24);
}

.ss-home-marquee-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #65f0df, #21a59a);
    box-shadow: 0 0 0 6px rgba(33, 165, 154, 0.12);
}

.ss-home-hero-feature {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ss-home-feature-card {
    position: relative;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    min-height: 100%;
    padding: 22px;
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(33, 165, 154, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
        var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--modern-shadow);
}

.ss-home-feature-card::after,
.ss-pop-card::after,
.news-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.1) 40%, transparent 62%);
    transform: translateX(-130%);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.ss-home-feature-card:hover::after,
.ss-pop-card:hover::after,
.news-item:hover::after {
    transform: translateX(130%);
}

.ss-home-feature-media {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        var(--bg-secondary);
    min-height: 100%;
}

.ss-home-feature-media::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.48));
    pointer-events: none;
}

.ss-home-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.ss-home-feature-fallback {
    min-height: 100%;
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: var(--accent);
}

.ss-home-feature-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ss-home-feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ss-home-chip,
.ss-home-spotlight-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ss-home-chip.is-muted {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
}

.ss-home-feature-content h2 {
    margin: 0;
    color: var(--text-bright);
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    line-height: 1.05;
}

.ss-home-feature-content p {
    margin: 0.85rem 0 0;
    color: rgba(234, 234, 234, 0.76);
    font-size: 0.9rem;
    line-height: 1.7;
}

.ss-home-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 1.25rem;
}

.ss-home-feature-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.ss-home-feature-meta i {
    color: var(--accent);
}

.ss-home-feature-link {
    width: fit-content;
    margin-top: 1rem;
}

.ss-home-spotlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ss-home-spotlight-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 120px;
    padding: 1rem;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: var(--modern-shadow-soft);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.ss-home-spotlight-card strong {
    color: var(--text-bright);
    font-size: 0.95rem;
    line-height: 1.35;
}

.ss-home-spotlight-card small {
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.ss-home-spotlight-card:hover {
    transform: translateY(-4px);
    border-color: rgba(33, 165, 154, 0.26);
    box-shadow: 0 24px 42px rgba(3, 7, 18, 0.28);
}

.ss-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
    margin-top: 1.4rem;
    margin-bottom: 3rem;
}

.ss-main-col,
.ss-side-col {
    min-width: 0;
}

.ss-home-section {
    margin-bottom: 2rem;
}

.ss-home-section:last-child {
    margin-bottom: 0;
}

.ss-section-title {
    position: relative;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ss-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 94px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), rgba(96, 165, 250, 0.9));
    box-shadow: 0 0 18px rgba(33, 165, 154, 0.18);
}

.ss-pop-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

[data-tilt] {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --lift: 0px;
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--lift));
    transform-style: preserve-3d;
    will-change: transform;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease;
}

[data-tilt].is-tilting {
    transition-duration: 0.12s;
}

.ss-pop-card,
.ss-table-wrapper,
.news-item {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--modern-shadow-soft);
}

.ss-pop-card {
    margin-bottom: 0;
    border-radius: 24px;
}

.ss-pop-card:hover,
.news-item:hover {
    --lift: -8px;
    border-color: rgba(33, 165, 154, 0.24);
    box-shadow: 0 26px 56px rgba(3, 7, 18, 0.32);
}

.ss-table-wrapper:hover {
    transform: translateY(-4px);
    border-color: rgba(33, 165, 154, 0.22);
    box-shadow: 0 26px 56px rgba(3, 7, 18, 0.26);
}

.ss-pop-poster {
    width: 160px;
}

.ss-pop-details {
    padding: 20px;
}

.ss-pop-title {
    margin-bottom: 14px;
    font-size: 1.08rem;
}

.ss-pop-downloads {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.78rem;
}

.ss-table-wrapper {
    border-radius: 26px;
    overflow: hidden;
}

.ss-table {
    font-size: 0.86rem;
}

.ss-table tr {
    transition: background 0.25s ease, transform 0.25s ease;
}

.ss-table th,
.ss-table td {
    padding: 13px 16px;
}

.ss-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(33, 165, 154, 0.12), rgba(96, 165, 250, 0.04));
}

.news-widget {
    position: relative;
}

.news-header {
    margin-bottom: 14px;
    padding: 0 0 0.85rem;
    font-size: 1.38rem;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.news-list {
    gap: 14px;
}

.news-item {
    border-radius: 22px;
}

.news-item.active {
    border-color: rgba(33, 165, 154, 0.28);
    background:
        linear-gradient(180deg, rgba(33, 165, 154, 0.08), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
}

.news-header-strip {
    width: 100%;
    padding: 18px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.news-header-strip:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(33, 165, 154, 0.35);
}

.news-title {
    font-size: 1rem;
    line-height: 1.35;
}

.news-toggle {
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.news-item.active .news-toggle {
    background: rgba(33, 165, 154, 0.14);
    color: var(--accent);
}

.news-item.active .news-toggle i {
    transform: rotate(180deg);
}

.news-body {
    opacity: 0;
    transition:
        max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.25s ease;
}

.news-item.active .news-body {
    opacity: 1;
}

.news-content {
    padding: 0 18px 22px;
}

[data-reveal] {
    opacity: 0;
    filter: blur(14px);
    transform: translate3d(0, 28px, 0);
    transition:
        opacity 0.72s ease,
        transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.72s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal="left"] {
    transform: translate3d(36px, 0, 0);
}

[data-reveal="right"] {
    transform: translate3d(-36px, 0, 0);
}

[data-reveal].is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
}

@keyframes heroFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -18px, 0) scale(1.08);
    }
}

@media (max-width: 1160px) {
    .ss-home-hero-grid,
    .ss-layout {
        grid-template-columns: 1fr;
    }

    .ss-side-col {
        width: 100%;
    }

    .ss-home-title {
        max-width: 14ch;
    }
}

@media (max-width: 820px) {
    .ss-home-hero {
        padding-top: 1.7rem;
    }

    .ss-home-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ss-home-feature-card {
        grid-template-columns: 1fr;
    }

    .ss-home-feature-media {
        min-height: 250px;
    }

    .ss-home-spotlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-root::after {
        left: 14px;
        right: 14px;
    }

    .search-box {
        border-radius: 16px;
    }

    .ss-home-title {
        max-width: none;
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .ss-home-description {
        font-size: 0.92rem;
    }

    .ss-home-hero-actions {
        flex-direction: column;
    }

    .ss-home-cta,
    .ss-home-ghost,
    .ss-home-feature-link {
        width: 100%;
    }

    .ss-home-stat {
        min-height: 96px;
    }

    .ss-section-title {
        flex-wrap: wrap;
    }

    .ss-pop-card {
        flex-direction: column;
    }

    .ss-pop-poster {
        width: 100%;
        height: 220px;
    }

    .news-header {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .ss-home-hero::before,
    .ss-home-hero::after,
    [data-reveal],
    [data-tilt],
    .header-root,
    .search-box,
    .ss-home-cta,
    .ss-home-ghost,
    .ss-home-feature-link,
    .ss-home-spotlight-card,
    .ss-pop-card,
    .ss-table-wrapper,
    .news-item,
    .news-body {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        filter: none !important;
    }

    [data-reveal] {
        opacity: 1 !important;
    }
}
