:root {
    --bg: #080b14;
    --bg-alt: #101625;
    --panel: #121a2b;
    --panel-2: #182236;
    --panel-3: #22304a;
    --text: #f6f8fc;
    --muted: #99a7c2;
    --accent: #7cf6d3;
    --accent-2: #58a6ff;
    --accent-soft: rgba(124, 246, 211, 0.12);
    --danger: #ff6b6b;
    --danger-soft: rgba(255, 107, 107, 0.12);
    --border: rgba(150, 173, 220, 0.18);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius: 24px;
    --radius-sm: 12px;
    --radius-xs: 10px;
    --container: 1240px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(88, 166, 255, 0.16), transparent 26%),
        radial-gradient(circle at top right, rgba(124, 246, 211, 0.11), transparent 24%),
        linear-gradient(180deg, #0d1220 0%, #080b14 44%, #05070d 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

iframe {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    line-height: 1.15;
}

p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

strong {
    color: var(--text);
}

code,
pre {
    font-family: Consolas, "Courier New", monospace;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.page-shell {
    padding: 28px 0 70px;
}

.stack-lg {
    display: grid;
    gap: 24px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(5, 9, 17, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
}

.nav-shell,
.nav-links,
.action-row,
.tag-row,
.pill-row,
.section-headline {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-shell {
    justify-content: space-between;
    min-height: 74px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark__icon,
.avatar-orb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), transparent 32%),
        linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #08111c;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(88, 166, 255, 0.22);
}

.brand-mark__image,
.profile-avatar-image {
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark__image {
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.brand-mark strong {
    display: block;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-mark small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-toggle-button {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.nav-toggle-button span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.nav-links a {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    transition: color 0.18s ease, opacity 0.18s ease;
    opacity: 0.9;
}

.nav-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.nav-pill,
.btn,
button,
.pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    cursor: pointer;
    font-weight: 700;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.nav-pill:hover,
.btn:hover,
button:hover,
.pill-link:hover {
    transform: translateY(-1px);
}

.btn-primary,
.nav-pill {
    background: linear-gradient(135deg, var(--accent), #9bf7dc 55%, var(--accent-2));
    color: #07121d;
    box-shadow: 0 14px 30px rgba(124, 246, 211, 0.22);
}

.btn-secondary,
.pill-link {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-danger {
    background: var(--danger-soft);
    color: #ffe0e0;
    border: 1px solid rgba(255, 107, 107, 0.34);
}

.panel,
.hero-banner,
.auth-panel,
.profile-hero-card,
.admin-hero,
.stats-hero {
    background: linear-gradient(180deg, rgba(20, 28, 44, 0.96), rgba(12, 17, 29, 0.98));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel,
.auth-panel,
.admin-hero {
    padding: 20px;
}

.panel-soft {
    background: rgba(255, 255, 255, 0.025);
}

.panel-accent {
    background:
        radial-gradient(circle at top right, rgba(124, 246, 211, 0.12), transparent 35%),
        linear-gradient(145deg, rgba(88, 166, 255, 0.14), rgba(10, 18, 32, 0.92));
}

.panel-accent .btn {
    margin-top: 18px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.hero-copy h1,
.admin-hero h1,
.details-hero__copy h1 {
    font-size: clamp(2.3rem, 4.4vw, 4rem);
    line-height: 1;
    margin-bottom: 14px;
}

.hero-copy .hero-text {
    max-width: 62ch;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.hero-banner,
.details-hero,
.watch-layout,
.content-grid {
    display: grid;
    gap: 24px;
}

.hero-banner {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    padding: 34px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(7, 11, 20, 0.86) 28%, rgba(7, 11, 20, 0.48) 58%, rgba(7, 11, 20, 0.2) 100%);
    pointer-events: none;
    z-index: -1;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-top: 24px;
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    background: rgba(8, 12, 22, 0.9);
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(103, 232, 214, 0.5);
    box-shadow: 0 0 0 3px rgba(103, 232, 214, 0.08);
}

textarea {
    min-height: 160px;
    resize: vertical;
}

.spotlight-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 500px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.spotlight-card img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    transform: scale(1.03);
}

.spotlight-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 28px;
    background: linear-gradient(180deg, transparent 10%, rgba(4, 8, 15, 0.96));
}

.spotlight-overlay h2 {
    margin: 12px 0 8px;
    font-size: 2rem;
}

.section-headline {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-headline h2 {
    font-size: 1.55rem;
}

.pill,
.meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pill-soft {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill-link {
    border: 1px solid transparent;
}

.pill-link.is-active,
.feed-item--active {
    border-color: var(--accent);
    background: rgba(103, 232, 214, 0.12);
}

.content-grid,
.watch-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

/* =============================================
   IMPROVED ANIME LIST UI
   - Clean grid, consistent cards, better badges
   - Perfect image aspect ratio & spacing
   - Responsive & hover effects
   ============================================= */

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px 20px;
    margin-top: 8px;
}

.anime-card {
    background: transparent;
    border-radius: 24px;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease;
    position: relative;
}

.anime-card:hover {
    transform: translateY(-6px);
}

.anime-card__media {
    position: relative;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    background: var(--panel-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.25s ease;
}

.anime-card:hover .anime-card__media {
    box-shadow: 0 20px 32px -14px rgba(0, 0, 0, 0.6);
}

.anime-card img {
    width: 100%;
    aspect-ratio: 2 / 2.8;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.anime-card:hover img {
    transform: scale(1.03);
}

.anime-card__badges {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.anime-mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 8px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.anime-mini-badge--dark {
    background: rgba(124, 246, 211, 0.9);
    color: #07121d;
    border: none;
}

.anime-card__body {
    padding: 14px 8px 8px 8px;
}

.anime-card h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
}

.anime-card h3 a {
    color: var(--text);
    transition: color 0.2s ease;
}

.anime-card h3 a:hover {
    color: var(--accent);
}

.anime-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.anime-card__dot {
    width: 3px;
    height: 3px;
    background: var(--muted);
    border-radius: 50%;
    opacity: 0.6;
}

.anime-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(124, 246, 211, 0.12);
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    border: 0.5px solid rgba(124, 246, 211, 0.3);
}

/* =============================================
   END OF ANIME LIST UI IMPROVEMENTS
   ============================================= */

.feed-list,
.ranking-list {
    display: grid;
    gap: 12px;
}

.feed-item,
.ranking-item {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.feed-item {
    grid-template-columns: 76px minmax(0, 1fr);
}

.ranking-item {
    grid-template-columns: 36px 76px minmax(0, 1fr);
}

.feed-item img,
.ranking-item img {
    width: 76px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
}

.feed-item strong,
.ranking-item strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.35;
}

.feed-item p,
.ranking-item p {
    font-size: 0.84rem;
    line-height: 1.45;
}

.ranking-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(103, 232, 214, 0.1);
    color: var(--accent);
    font-weight: 800;
}

.details-hero {
    grid-template-columns: 300px minmax(0, 1fr);
    background:
        radial-gradient(circle at top right, rgba(124, 246, 211, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(20, 28, 44, 0.96), rgba(12, 17, 29, 0.98));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.details-hero > img {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
}

.details-hero__copy {
    min-width: 0;
}

.details-hero__copy .tag-row {
    margin: 16px 0;
}

.details-hero__copy > p {
    margin-bottom: 18px;
}

.stats-grid,
.stats-hero,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.stats-grid div,
.stat-box,
.info-grid div {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(124, 246, 211, 0.08), rgba(88, 166, 255, 0.08));
}

.stats-grid span,
.stat-box span,
.info-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.stats-grid strong,
.stat-box strong,
.info-grid strong {
    font-size: 1.05rem;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.episode-card {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--panel);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.episode-card img {
    width: 100%;
    height: 162px;
    object-fit: cover;
}

.episode-card > div {
    padding: 14px;
}

.episode-card h3 {
    margin: 10px 0 8px;
    font-size: 1rem;
    line-height: 1.35;
}

.video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius);
    background: #05070d;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
}

.server-board {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.server-board > div {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.server-board strong {
    display: block;
    margin-bottom: 10px;
}

.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.comment-form {
    margin-bottom: 18px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-inline input[type="checkbox"] {
    width: auto;
}

.comment-item__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.comment-item:last-child {
    border-bottom: 0;
}

.comment-item strong {
    display: block;
    margin-bottom: 6px;
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(124, 246, 211, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(20, 28, 44, 0.96), rgba(12, 17, 29, 0.98));
}

.avatar-orb {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 22px;
    font-size: 2rem;
}

.profile-avatar-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 22px;
}

.role-pill--green {
    background: rgba(56, 214, 111, 0.16);
    color: #8ef0ad;
    border-color: rgba(56, 214, 111, 0.35);
}

.role-badge--super-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.24), rgba(251, 191, 36, 0.22));
    color: #fecaca;
}

.role-badge--content-admin {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(34, 211, 238, 0.22));
    color: #bfdbfe;
}

.role-badge--moderator {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(16, 185, 129, 0.22));
    color: #bbf7d0;
}

.role-badge--user {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), rgba(71, 85, 105, 0.24));
    color: #e2e8f0;
}

.role-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.profile-link-inline {
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.profile-link-inline:hover {
    color: var(--accent);
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.28), rgba(34, 211, 238, 0.2));
    color: #dbeafe;
    border: 1px solid rgba(147, 197, 253, 0.35);
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.18);
}

.auth-shell {
    width: min(620px, calc(100% - 32px));
    margin: 0 auto;
}

.form-shell {
    max-width: 900px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-inline-form {
    display: contents;
}

.user-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.chart-grid,
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.chart-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.chart-bars {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.chart-bar-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: center;
}

.chart-bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.chart-bar-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.checkbox-grid {
    display: grid;
    gap: 8px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.checkbox-grid input[type="checkbox"] {
    width: auto;
}

.feed-item--stack {
    grid-template-columns: 1fr;
}

.notice {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(103, 232, 214, 0.1);
    border: 1px solid rgba(103, 232, 214, 0.32);
    color: var(--text);
}

.danger {
    background: var(--danger-soft);
    border-color: rgba(255, 107, 107, 0.4);
}

pre {
    overflow-x: auto;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    color: var(--muted);
    background: rgba(3, 5, 10, 0.46);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.footer-grid strong {
    display: block;
    margin-bottom: 6px;
}

.footer-grid p a {
    color: var(--text);
}

@media (max-width: 1040px) {
    .hero-banner,
    .details-hero,
    .content-grid,
    .watch-layout {
        grid-template-columns: 1fr;
    }

    .spotlight-card,
    .spotlight-card img {
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100%, calc(100% - 20px));
    }

    .nav-shell,
    .action-row,
    .tag-row,
    .pill-row,
    .section-headline {
        flex-wrap: wrap;
    }

    .brand-mark {
        align-items: flex-start;
    }

    .brand-mark small {
        white-space: normal;
    }

    .nav-toggle-button {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 14px 0 4px;
    }

    .nav-links a {
        padding: 10px 0;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    .hero-banner {
        padding: 22px;
    }

    .details-hero {
        padding: 18px;
    }

    /* Anime grid responsive improvements */
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px 14px;
    }

    .anime-card__body {
        padding: 10px 6px 6px 6px;
    }

    .anime-card h3 {
        font-size: 0.9rem;
        line-height: 1.35;
        margin-bottom: 6px;
    }

    .anime-card__meta {
        font-size: 0.7rem;
        gap: 6px;
    }

    .anime-mini-badge {
        height: 22px;
        font-size: 0.6rem;
        padding: 0 6px;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding-top: 18px;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .hero-meta-row {
        gap: 10px;
    }

    .episode-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .ranking-index {
        display: none;
    }

    .profile-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn,
    button,
    .pill-link,
    .nav-pill {
        width: 100%;
    }

    .chart-bar-row {
        grid-template-columns: 1fr;
    }

    .chart-bar-row strong {
        text-align: right;
    }

    .admin-table {
        min-width: 640px;
    }
}

@media (max-width: 480px) {
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 12px;
    }

    .anime-card__media {
        border-radius: 16px;
    }

    .anime-card__body {
        padding: 8px 4px 4px 4px;
    }

    .anime-card h3 {
        font-size: 0.85rem;
    }

    .anime-card__meta {
        font-size: 0.65rem;
    }
}
/* =============================================
   HERO SLIDER & SWIPER STYLES
   ============================================= */

.hero-slider {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: linear-gradient(180deg, rgba(20, 28, 44, 0.96), rgba(12, 17, 29, 0.98));
}

.hero-slider .hero-banner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 40px;
}

.swiper-pagination-bullet {
    background: var(--text) !important;
    opacity: 0.3 !important;
}

.swiper-pagination-bullet-active {
    background: var(--accent) !important;
    opacity: 1 !important;
    width: 24px !important;
    border-radius: 4px !important;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--accent) !important;
    background: rgba(0, 0, 0, 0.3);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: 900;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
}

.search-section {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.search-section .search-bar {
    width: 100%;
    max-width: 800px;
    margin-top: 0;
}

@media (max-width: 992px) {
    .hero-slider .hero-banner {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    
    .hero-slider .spotlight-card {
        display: none;
    }
}

/* Gift Animation */
@keyframes giftShake {
  0% { transform: rotate(0); }
  15% { transform: rotate(10deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(5deg); }
  60% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
  85% { transform: rotate(-2deg); }
  100% { transform: rotate(0); }
}
.gift-shake { animation: giftShake 0.6s ease-in-out; }


/* Nav Profile */
.nav-profile-link { display: flex; align-items: center; }
.nav-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.nav-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #000; display: grid; place-items: center; font-weight: 800; font-size: 1rem; border: 2px solid rgba(255,255,255,0.1); }


/* Adjusted Profile Sizes */
.nav-avatar, .nav-avatar-placeholder { width: 34px !important; height: 34px !important; font-size: 0.85rem !important; }
.big-avatar, .big-avatar-placeholder { width: 110px !important; height: 110px !important; border-radius: 30px !important; font-size: 2.2rem !important; }


/* Final Size Adjustments and Visibility Fix */
.nav-avatar, .nav-avatar-placeholder { width: 30px !important; height: 30px !important; min-width: 30px !important; flex-shrink: 0 !important; font-size: 0.8rem !important; }
.big-avatar, .big-avatar-placeholder { width: 90px !important; height: 90px !important; min-width: 90px !important; border-radius: 24px !important; font-size: 2rem !important; }


/* Fix Nav Overflow */
.nav-links { gap: 20px !important; overflow: visible !important; }
.nav-profile-link { margin-left: 5px; }


/* Watchlist Dropdown Widget */
.watchlist-dropdown {
    position: relative;
    display: inline-block;
}

.watchlist-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.watchlist-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.watchlist-toggle i {
    width: 18px;
    height: 18px;
}

.watchlist-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 100;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideDown 0.2s ease;
}

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

.watchlist-option {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none !important;
    cursor: pointer;
    justify-content: flex-start;
}

.watchlist-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.watchlist-option.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.watchlist-option--danger {
    color: var(--danger);
    margin-top: 4px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
}

.watchlist-option--danger:hover {
    background: var(--danger-soft);
    color: #ff8080;
}

.watchlist-hint {
    font-size: 0.85rem;
    color: var(--muted);
}

.watchlist-hint a {
    color: var(--accent);
    text-decoration: underline;
}


/* =============================================
   ADMIN SETTINGS — NEW UI COMPONENTS
   Toggle Switch, Settings Grid, Toggle Cards
   ============================================= */

/* Form shell for settings pages */
.form-shell {
    display: grid;
    gap: 0;
}

.form-shell form {
    gap: 16px;
}

/* 2-column responsive settings grid */
.settings-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Toggle card row */
.settings-toggle-row {
    display: grid;
    gap: 12px;
}

/* Individual toggle card */
.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 0.22s ease, background 0.22s ease;
}

.toggle-card--on {
    border-color: rgba(124, 246, 211, 0.35);
    background: rgba(124, 246, 211, 0.06);
}

.toggle-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.97rem;
}

/* iOS-style toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 50px;
    height: 28px;
    cursor: pointer;
    gap: 0;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.22s ease, border-color 0.22s ease;
}

.toggle-switch input:checked ~ .toggle-track {
    background: linear-gradient(135deg, var(--accent), #58a6ff);
    border-color: transparent;
    box-shadow: 0 0 14px rgba(124, 246, 211, 0.28);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch input:checked ~ .toggle-track .toggle-thumb {
    transform: translateX(22px);
}

/* Announcement banner (sitewide) */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 10px 24px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #07121d;
    font-weight: 700;
    font-size: 0.92rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(124, 246, 211, 0.22);
}

.announcement-banner a {
    color: #07121d;
    text-decoration: underline;
}

.announcement-banner .close-announcement {
    background: none;
    border: none;
    color: #07121d;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
    border-radius: 4px;
}

.announcement-banner .close-announcement:hover {
    opacity: 1;
    transform: none;
}

@media (max-width: 640px) {
    .settings-grid-2 {
        grid-template-columns: 1fr;
    }
    .toggle-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
