:root {
    --primary: #5661a2;
    --primary-dark: #404a87;
    --accent: #d77c4a;
    --bg: #12151d;
    --card: #1b1f29;
    --text: #f2f3f7;
    --muted: rgba(242, 243, 247, 0.68);
}

body.theme-light {
    --primary: #4a547f;
    --primary-dark: #364069;
    --accent: #c96c3a;
    --bg: #f3f4f8;
    --card: #ffffff;
    --text: #222633;
    --muted: rgba(34, 38, 51, 0.6);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: var(--card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.theme-light header {
    background: var(--card);
    border-bottom: 1px solid rgba(34, 38, 51, 0.08);
}

nav[data-nav] {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--text);
    text-decoration: none;
}

/* .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    font-size: 20px;
    box-shadow: 0 8px 22px rgba(125, 91, 255, 0.35);
} */

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    position: relative;
    color: rgba(244, 244, 255, 0.86);
    text-decoration: none;
    font-size: 0.96rem;
    transition: color 0.2s ease;
}

body.theme-light .nav-links a {
    color: rgba(26, 27, 58, 0.75);
}

body.theme-light .nav-links a:hover,
body.theme-light .nav-links a:focus {
    color: rgba(26, 27, 58, 0.95);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
    justify-self: end;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.26s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: #ffffff;
}

.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
        padding: 8px 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;
        background: rgba(12, 12, 25, 0.65);
}

body.theme-light .search {
    border-color: rgba(26, 27, 58, 0.12);
    background: rgba(235, 236, 255, 0.9);
}

.search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.94rem;
    width: 160px;
}

.search input::placeholder {
    color: rgba(244, 244, 255, 0.45);
}

body.theme-light .search input::placeholder {
    color: rgba(26, 27, 58, 0.45);
}

.search button {
    border: none;
    background: var(--primary);
    color: #fff;
        padding: 8px 14px;
        border-radius: 10px;
        cursor: pointer;
        font-weight: 500;
        transition: background 0.2s ease, transform 0.2s ease;
}

.search button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.theme-toggle {
    margin-left: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 12, 25, 0.5);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
}

body.theme-light .theme-toggle {
    border-color: rgba(26, 27, 58, 0.18);
    background: rgba(255, 255, 255, 0.75);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 12, 25, 0.5);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.menu-toggle:hover {
    transform: translateY(-2px);
}

body.theme-light .menu-toggle {
    border-color: rgba(26, 27, 58, 0.18);
    background: rgba(255, 255, 255, 0.75);
}

main {
    max-width: 1100px;
    margin: 42px auto;
    padding: 0 32px 48px;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--card);
    box-shadow: 0 18px 46px rgba(5, 6, 12, 0.32);
}

.hero-empty {
    display: grid;
    gap: 18px;
    padding: 48px;
    text-align: center;
}

.hero-empty h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.hero-empty p {
    margin: 0;
    color: var(--muted);
}

.hero-empty .primary {
    justify-self: center;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.hero-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    transition: transform 0.6s ease;
}

.hero-slide {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    padding: 44px 42px;
    align-items: center;
}

.hero-media img {
    width: 100%;
    border-radius: 22px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(6, 8, 15, 0.35);
}

.hero-content {
    display: grid;
    gap: 18px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
}

.hero-genres {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-description {
    margin: 0;
    color: rgba(244, 244, 244, 0.78);
    line-height: 1.6;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions a {
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

.hero-actions a.primary {
    background: var(--primary);
    color: #fff;
}

.hero-actions a.secondary {
    background: rgba(32, 36, 46, 0.72);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-actions a:hover {
    transform: translateY(-2px);
}

.hero-indicators {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 10px;
    background: rgba(32, 36, 46, 0.75);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-indicators button.is-active {
    background: var(--primary);
    transform: scale(1.2);
}

body.theme-light .hero {
    background: rgba(245, 246, 250, 0.93);
    border-color: rgba(34, 38, 51, 0.06);
    box-shadow: 0 18px 42px rgba(34, 38, 51, 0.14);
}

body.theme-light .hero-description {
    color: rgba(29, 34, 51, 0.78);
}

body.theme-light .hero-tag {
    background: rgba(86, 97, 162, 0.18);
    color: rgba(34, 38, 51, 0.82);
}

@media (max-width: 900px) {
    .hero-slide {
        grid-template-columns: 1fr;
        padding: 36px 28px 70px;
        gap: 24px;
        justify-items: center;
    }

    .hero-media {
        order: 1;
        width: min(280px, 100%);
    }

    .hero-content {
        order: 2;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hero-slide {
        padding: 30px 24px 70px;
    }

    .hero-actions a {
        flex: 1 1 100%;
        justify-content: center;
    }

    .hero-description {
        font-size: 0.95rem;
    }
}

.value-section {
    margin-top: 48px;
    display: grid;
    gap: 28px;
}

#beranda,
#koleksi,
#genre,
#pengaturan,
#kontak,
#fitur {
    scroll-margin-top: 110px;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.value-card {
    background: var(--card);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 24px 26px;
    box-shadow: 0 18px 32px rgba(10, 12, 18, 0.26);
    display: grid;
    gap: 12px;
}

.value-card h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text);
}

.value-card p {
    margin: 0;
    color: rgba(244, 244, 255, 0.78);
    line-height: 1.6;
}

body.theme-light .value-card {
    background: var(--card);
    border-color: rgba(34, 38, 51, 0.08);
    box-shadow: 0 18px 28px rgba(34, 38, 51, 0.1);
}

body.theme-light .value-card p {
    color: rgba(26, 27, 58, 0.72);
}

.card-section {
    margin-top: 56px;
    display: grid;
    gap: 28px;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.page-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}

.page-btn.is-active,
.page-btn:hover {
    background: var(--primary);
    color: #fff;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.section-header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-header p {
    margin: 0;
    color: var(--muted);
}

.card-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.anime-card {
    background: var(--card);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 30px rgba(10, 12, 18, 0.28);
    display: grid;
    grid-template-rows: auto 1fr;
    transition: transform 0.2s ease;
}

.anime-card:hover {
    transform: translateY(-4px);
}

body.theme-light .anime-card {
    background: var(--card);
    border-color: rgba(34, 38, 51, 0.08);
}

.card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 15, 26, 0.75);
    font-size: 0.8rem;
    font-weight: 600;
}

body.theme-light .card-badge {
    background: rgba(26, 27, 58, 0.75);
}

.card-body {
    padding: 20px 22px 24px;
    display: grid;
    gap: 12px;
}

.card-body h3 {
    margin: 0;
    font-size: 1.2rem;
}

.card-body .genres {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.card-body .description {
    margin: 0;
    color: rgba(244, 244, 255, 0.75);
    font-size: 0.92rem;
    line-height: 1.5;
    max-height: 3.6em;
    overflow: hidden;
}

body.theme-light .card-body .description {
    color: rgba(26, 27, 58, 0.75);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
}

.meta div {
    display: grid;
    gap: 4px;
}

.meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(244, 244, 255, 0.6);
    margin: 0;
}

.meta dd {
    margin: 0;
    font-weight: 600;
}

body.theme-light .meta dt {
    color: rgba(34, 38, 51, 0.6);
}

body.theme-light .meta dd {
    color: var(--text);
}

.card-action {
    justify-self: start;
    text-decoration: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--primary);
    font-weight: 600;
    transition: transform 0.2s ease;
}

body.theme-light .card-action {
    color: #fff;
}

.card-action:hover {
    transform: translateY(-2px);
}

.empty-state {
    padding: 42px;
    border-radius: 24px;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    box-shadow: 0 18px 30px rgba(10, 10, 20, 0.3);
}

body.theme-light .empty-state {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(26, 27, 58, 0.06);
    box-shadow: 0 18px 30px rgba(26, 27, 58, 0.12);
}

.empty-state h3 {
    margin: 0 0 12px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.genre-section {
    margin-top: 56px;
    display: grid;
    gap: 24px;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.genre-tag {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    background: rgba(25, 28, 39, 0.55);
    transition: transform 0.2s ease;
    font-weight: 600;
    font-size: 0.92rem;
}

.genre-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(125, 91, 255, 0.25);
}

body.theme-light .genre-tag {
    border-color: rgba(34, 38, 51, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(34, 38, 51, 0.88);
    box-shadow: 0 10px 16px rgba(34, 38, 51, 0.08);
}

.settings-section {
    margin: 60px 0 80px;
}

.settings-card {
    background: rgba(15, 15, 30, 0.6);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px;
    box-shadow: 0 20px 40px rgba(10, 10, 22, 0.35);
    display: grid;
    gap: 16px;
}

.settings-card a {
    color: var(--accent);
    text-decoration: none;
}

.settings-card a:hover {
    text-decoration: underline;
}

body.theme-light .settings-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(26, 27, 58, 0.1);
    box-shadow: 0 18px 32px rgba(26, 27, 58, 0.12);
}

.contact-section {
    margin: 60px 0 80px;
    display: grid;
    gap: 24px;
}

.contact-card {
    background: var(--card);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 30px;
    display: grid;
    gap: 18px;
    box-shadow: 0 18px 32px rgba(5, 6, 12, 0.26);
}

.contact-item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
}

.contact-label {
    min-width: 82px;
    font-weight: 600;
    color: var(--muted);
}

.contact-card a {
    color: var(--text);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-note {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

body.theme-light .contact-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(34, 38, 51, 0.1);
    box-shadow: 0 16px 28px rgba(34, 38, 51, 0.1);
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 32px;
    background: var(--card);
    color: var(--muted);
}

.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

body.theme-light .site-footer {
    border-top-color: rgba(34, 38, 51, 0.08);
    background: var(--card);
}

.detail-page {
    min-height: 100vh;
}

.detail-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: linear-gradient(135deg, rgba(15, 15, 26, 0.9), rgba(30, 30, 50, 0.7));
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.detail-header nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header .back-link {
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    font-weight: 600;
    background: rgba(12, 12, 25, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-header .back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(15, 15, 30, 0.4);
}

body.theme-light .detail-header {
    background: linear-gradient(135deg, rgba(245, 246, 255, 0.95), rgba(232, 233, 255, 0.9));
    border-bottom: 1px solid rgba(26, 27, 58, 0.08);
}

body.theme-light .detail-header .back-link {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(26, 27, 58, 0.12);
    box-shadow: 0 6px 14px rgba(26, 27, 58, 0.1);
}

body.theme-light .detail-header .back-link:hover {
    box-shadow: 0 12px 20px rgba(26, 27, 58, 0.15);
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-container {
    max-width: 1100px;
    margin: 48px auto 80px;
    padding: 0 32px;
    display: grid;
    gap: 48px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    background: var(--card);
    border-radius: 28px;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.theme-light .detail-hero {
    border-color: rgba(34, 38, 51, 0.08);
}

body.theme-light .detail-hero .description {
    color: rgba(34, 38, 51, 0.78);
}

.detail-hero .poster img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-hero .info {
    display: grid;
    gap: 16px;
}

.detail-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.detail-hero .info .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0;
}

.detail-hero .info .meta div {
    display: grid;
    gap: 6px;
}

.detail-hero .info .meta dt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(244, 244, 255, 0.6);
}

body.theme-light .detail-hero .info .meta dt {
    color: rgba(34, 38, 51, 0.6);
}

.detail-hero .description {
    margin: 0;
    color: rgba(244, 244, 255, 0.78);
    line-height: 1.6;
}

body.theme-light .detail-hero .description {
    color: rgba(34, 38, 51, 0.78);
}

.download-section {
    display: grid;
    gap: 18px;
}

#unduhan,
#komentar {
    scroll-margin-top: 110px;
}

.download-section h2 {
    margin: 0;
}

.download-section p {
    margin: 0;
    color: var(--muted);
}

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

.download-card {
    text-decoration: none;
    padding: 22px 20px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 6px;
    color: var(--text);
    font-weight: 600;
    transition: opacity 0.2s ease;
}

body.theme-light .download-card {
    border-color: rgba(34, 38, 51, 0.08);
}

.download-card .quality {
    font-size: 1.1rem;
}

.download-card .download-host {
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.download-card .action {
    font-size: 0.9rem;
    color: rgba(244, 244, 255, 0.85);
}

body.theme-light .download-card .action {
    color: var(--text);
}

.download-grid .empty {
    margin: 0;
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
}

.comment-section {
    display: grid;
    gap: 22px;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comment-header span {
    color: var(--muted);
}

.comment-form {
    display: grid;
    gap: 16px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px 24px;
}

body.theme-light .comment-form {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(34, 38, 51, 0.12);
}

.comment-form .field-group {
    display: grid;
    gap: 16px;
}

.comment-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(28, 30, 38, 0.8);
    color: var(--text);
    font: inherit;
}

body.theme-light .comment-form input,
body.theme-light .comment-form textarea {
    border-color: rgba(34, 38, 51, 0.1);
    background: rgba(255, 255, 255, 0.96);
}

.comment-form textarea {
    resize: vertical;
}

.comment-form button {
    justify-self: start;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.comment-form button:hover {
    opacity: 0.85;
}

.comment-flash {
    background: rgba(255, 95, 129, 0.18);
    border: 1px solid rgba(255, 95, 129, 0.4);
    border-radius: 16px;
    padding: 12px 16px;
}

.comment-flash ul {
    margin: 0;
    padding-left: 18px;
}

.comment-list {
    display: grid;
    gap: 20px;
}

.comment-item {
    background: var(--card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 22px 20px;
    display: grid;
    gap: 16px;
}

body.theme-light .comment-item {
    border-color: rgba(34, 38, 51, 0.1);
}

.comment-item header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.comment-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-initial {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
}

.comment-item time {
    font-size: 0.82rem;
    color: var(--muted);
}

.comment-item p {
    margin: 0;
    color: rgba(244, 244, 255, 0.85);
    line-height: 1.6;
}

body.theme-light .comment-item p {
    color: rgba(34, 38, 51, 0.78);
}

.comment-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
}

.comment-section .empty {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    nav[data-nav] {
        padding: 18px 20px;
        grid-template-columns: auto auto;
        gap: 16px;
    }

    .menu-toggle {
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }

    .nav-links {
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
        padding: 16px 20px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        background: rgba(15, 15, 26, 0.85);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
    }

    body.theme-light .nav-links {
        background: rgba(245, 246, 255, 0.95);
        border-color: rgba(26, 27, 58, 0.1);
    }

    nav.is-open .nav-links {
        max-height: 320px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        width: 100%;
    }

    .nav-controls {
        grid-column: 1 / -1;
        width: 100%;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: stretch;
    }

    .search {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
    }

    .search input {
        width: 100%;
    }

    .theme-toggle {
        margin-left: 0;
        width: 48px;
        height: 44px;
    }

    .detail-actions {
        width: 100%;
        justify-content: space-between;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

@media (max-width: 600px) {
    main {
        padding: 0 20px 40px;
    }

    .hero {
        padding: 36px 24px;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions a {
        flex: 1 1 100%;
        justify-content: center;
    }

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

    .detail-container {
        padding: 0 20px 60px;
        gap: 36px;
    }

    .detail-header nav {
        padding: 16px 20px;
    }

    .genre-tags {
        gap: 10px;
    }

    .genre-tag {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }

    .settings-card {
        padding: 24px;
    }

    .site-footer {
        padding: 20px;
    }
}
