@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #f5f5f5;
    line-height: 1.6;
    margin-top: -24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    min-height: calc(100vh - 140px);
}

.detail-flash-stack {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 1200;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #f8fafc;
    background: rgba(18, 24, 38, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    font-size: 0.86rem;
}

.detail-flash i {
    color: #38bdf8;
    margin-top: 3px;
}

.detail-flash-success i {
    color: #22c55e;
}

.detail-flash-error i {
    color: #ef4444;
}

.admin-floating-edit {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 1150;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #101014;
    background: linear-gradient(135deg, #facc15, #fb7185);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(250, 204, 21, 0.12);
    font-size: 1.2rem;
    cursor: grab;
    opacity: 0;
    transform: scale(0.92);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.admin-floating-edit[hidden] {
    display: none;
}

.admin-floating-edit.is-revealed {
    opacity: 1;
    transform: scale(1);
}

.admin-floating-edit:hover {
    transform: translateY(-2px) scale(1);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.5), 0 0 0 7px rgba(251, 113, 133, 0.16);
}

.admin-floating-edit.is-dragging {
    cursor: grabbing;
    transform: scale(0.96);
    transition: none;
}

.admin-floating-edit:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.anime-hero {
    display: flex;
    flex-direction: column;
    margin-bottom: -3rem;
    gap: 0.1rem;
}

.anime-card {
    flex: 1;
    background-color: #1e1e1e;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.anime-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.anime-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.anime-card:hover .anime-image img {
    transform: scale(1.05);
}

.anime-details {
    padding: 0.8rem;
}

.anime-title {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
    letter-spacing: -0.09px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 2px solid #ff6b6b;
    position: relative;
}

.anime-title span {
    background: linear-gradient(deg, #ff6b6b, #ff8e8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.anime-meta {
    color: #b0b0b0;
    margin-bottom: 1.5rem;
    font-size: 0.7rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
}

.anime-meta strong {
    color: #e0e0e0;
    font-weight: 600;
}

.anime-meta strong {
    color: #d0d0d0;
}

.anime-synopsis {
    color: #d5d5d5;
    font-size: 0.76rem;
    line-height: 1.8;
    max-height: 300px;
    overflow-y: auto;
    margin-top: -0.8rem;
    text-align: justify;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.anime-synopsis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e, transparent);
    border-radius: 8px 8px 0 0;
}

.anime-synopsis::-webkit-scrollbar {
    width: 0px;
}

.anime-synopsis::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.anime-synopsis::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.anime-synopsis::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff5252, #ff7a7a);
    box-shadow: 0 0 6px rgba(255, 107, 107, 0.4);
}

.sidebar {
    width: 100%;
    background-color: #1e1e1e;
    border-radius: 1px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: visible;
    position: relative;
    top: -33px;
    margin-top: 2rem;
}

.season-tabs {
    display: flex;
    border-bottom: 2px solid #252525;
    flex-direction: column;
}

.season-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    color: #a0a0a0;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #252525;
}

.season-tab.active {
    color: #ff6b6b;
    background-color: #252525;
    border-bottom: 2px solid #ff6b6b;
}

.season-tab:hover:not(.active) {
    color: #d0d0d0;
    background-color: #232323;
}

.episode-container {
    padding: 1rem;
    display: none;
}

.episode-container:first-child {
    display: block;
}

.quality-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.episode-card {
    background-color: #252525;
    padding: 0.99rem;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    text-align: center;
    font-size: 0.8rem;
}

.episode-card:hover {
    background-color: #303030;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.play-icon {
    color: #ff6b6b;
    font-size: 1rem;
}

.episode-card:hover .play-icon {
    transform: scale(1.2);
}

.app-footer {
    background-color: #1a1a1a;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    margin-top: 2rem;
}

.footer-title {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.detail-partner-footer {
    padding: 28px 16px 32px;
    text-align: center;
    background: #050505;
    border-top: 1px solid #1f1f1f;
}

.detail-partner-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.detail-partner-link img {
    width: 170px;
    max-width: min(170px, 70vw);
    height: auto;
}

.detail-partner-link span {
    font-family: 'Outfit', 'Inter', 'Sora', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(90deg, #ffffff, #9fdcff, #b98cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.detail-partner-link:hover span {
    background: linear-gradient(90deg, #ffffff, #c7ecff, #d7bdff);
    -webkit-background-clip: text;
    background-clip: text;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.anime-card, .sidebar {
    animation: fadeIn 0.5s ease-in;
}

.netflix-season-selector {
    background-color: #1a1a1a;
    border-radius: 8px 8px 0 0;
    padding: 12px 10px;
    position: relative;
    z-index: 20;
    min-height: 65px;
    overflow: visible;
}

.season-dropdown {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.current-season {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #252525;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #e0e0e0;
    min-height: 48px;
}

.current-season:hover {
    background-color: #303030;
}

.current-season i {
    transition: transform 0.3s ease;
    font-size: 16px;
    margin-left: 10px;
}

.current-season.active i {
    transform: rotate(180deg);
}

.season-options {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #252525;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    visibility: hidden;
    min-width: 200px;
    padding-bottom: env(safe-area-inset-bottom);
}

.season-options.show {
    max-height: 70vh;
    opacity: 1;
    visibility: visible;
    border-radius: 12px 12px 0 0;
}

.season-option {
    padding: 14px 15px;
    transition: all 0.2s ease;
    color: #d0d0d0;
    min-height: 45px;
}

.season-option:hover {
    background-color: #303030;
    color: #ff6b6b;
}

.season-option.selected {
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    font-weight: 600;
}

.season-options::-webkit-scrollbar {
    width: 6px;
}

.season-options::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

.season-options::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 10px;
}

.episode-container {
    border-top: 1px solid #303030;
    padding-top: 15px;
    min-height: 150px;
}

.episode-container:empty::after {
    content: "No quality options available";
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #777;
    font-style: italic;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.dropdown-active::after {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb h1 {
    font-size: 1.5rem;
    color: #e0e0e0;
}

.breadcrumb h1 span {
    color: #ff6b6b;
}

p[data-filename] {
    background-color: #252525;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    overflow-wrap: break-word;
    word-break: break-all;
    margin: 1rem 0 2rem 0;
}

.download-btn {
    display: inline-block;
    background-color: #ff6b6b;
    color: #fff;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.error-message {
    color: #ff5252;
    background-color: rgba(255, 82, 82, 0.1);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #ff5252;
    margin: 1rem 0;
}

.more-like-this {
    margin-top: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 0 0 1px 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    font-weight: 500;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 2px;
}

.similar-anime-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 15px 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.similar-anime-card {
    min-width: 160px;
    max-width: 220px;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.similar-anime-grid::-webkit-scrollbar {
    height: 8px;
}

.similar-anime-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 4px;
}

.similar-anime-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.similar-anime-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 107, 107, 0.2);
    background: linear-gradient(135deg, #353535, #2a2a2a);
}

.similar-anime-image {
    height: 120px;
    overflow: hidden;
    position: relative;
}

.similar-anime-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.similar-anime-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9);
}

.similar-anime-card:hover .similar-anime-image img {
    transform: scale(1.1);
    filter: brightness(1);
}

.similar-anime-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0.9), rgba(30, 30, 30, 1));
}

.similar-anime-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-anime-genre {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: auto;
    background: rgba(255, 107, 107, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.no-similar {
    grid-column: span 1;
    padding: 30px;
    text-align: center;
    color: #777;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-style: italic;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

@media (min-width: 1024px) {

    main {
        max-width: 800px;
        padding: 0 2rem;
    }

    .anime-hero {
        gap: 1rem;
    }

    .anime-image {
        height: 350px;
        border-radius: 12px;
    }

    .anime-title {
        font-size: 1.5rem;
        padding: 1rem;
    }

    .anime-meta {
        font-size: 1rem;
        padding: 1rem;
    }

    .anime-synopsis {
        font-size: 0.95rem;
        padding: 1.2rem;
        max-height: 400px;
    }

    .anime-details {
        padding: 1.5rem;
    }

    .netflix-season-selector {
        padding: 20px 15px;
        overflow: visible;
    }

    .current-season {
        padding: 16px 20px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .season-options {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 10px;
        z-index: 1000;
        padding-bottom: 0;

        bottom: auto;
        background-color: #252525;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .season-options.show {
        max-height: 300px;
        border-radius: 10px;
        opacity: 1;
        visibility: visible;
    }

    .season-option {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .quality-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .episode-card {
        padding: 1.3rem;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .play-icon {
        font-size: 1.4rem;
    }

    .episode-container {
        padding: 1.5rem;
    }

    .more-like-this {
        padding: 25px;
        border-radius: 0 0 12px 12px;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .similar-anime-card {
        min-width: 200px;
        max-width: 250px;
    }

    .similar-anime-image {
        height: 160px;
    }

    .similar-anime-info {
        padding: 20px;
    }

    .similar-anime-title {
        font-size: 1rem;
    }

    .similar-anime-genre {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    body::after {
        display: none;
    }

    body.dropdown-active::after {
        display: none;
    }

    .similar-anime-grid::-webkit-scrollbar {
        height: 10px;
    }

    .anime-synopsis::-webkit-scrollbar {
        width: 8px;
    }

    .anime-synopsis::-webkit-scrollbar-thumb {
        background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
        border-radius: 4px;
    }
}

@media (min-width: 1440px) {
    main {
        max-width: 900px;
    }

    .anime-image {
        height: 400px;
    }

    .anime-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 320px) {
    .episode-card {
        padding: 0.4rem;
        font-size: 0.7rem;
    }

    .play-icon {
        font-size: 0.8rem;
    }
}

body {
    background-color: #000000 !important;
}

main {
    background: transparent;
}

.anime-card,
.sidebar,
.netflix-season-selector,
.more-like-this {
    background: #050505 !important;
}

.current-season,
.season-options,
.episode-card,
p[data-filename] {
    background-color: #0b0b0b !important;
}

.current-season:hover,
.episode-card:hover,
.season-option:hover,
.season-tab:hover:not(.active) {
    background-color: #151515 !important;
}

.season-tab.active {
    background-color: #101010 !important;
}

.episode-container {
    border-top-color: #181818 !important;
}

.anime-title,
.anime-meta,
.anime-synopsis {
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.similar-anime-card {
    background: linear-gradient(135deg, #0b0b0b, #060606) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

.similar-anime-card:hover {
    background: linear-gradient(135deg, #141414, #090909) !important;
}

.similar-anime-info {
    background: linear-gradient(to bottom, rgba(8, 8, 8, 0.95), rgba(5, 5, 5, 1)) !important;
}

.no-similar {
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.similar-anime-grid::-webkit-scrollbar-track,
.season-options::-webkit-scrollbar-track {
    background: #0a0a0a !important;
}

@media (min-width: 1100px) {
    body {
        margin-top: 0;
    }

    main {
        max-width: 1400px;
        margin: 2.2rem auto;
        padding: 0 1.5rem;
    }

    .anime-hero {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
        gap: 1.25rem;
        align-items: start;
        margin-bottom: 1rem;
    }

    .anime-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        border-radius: 12px;
    }

    .anime-image {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        align-self: start;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .anime-image img {
        height: 100%;
    }

    .anime-details {
        padding: 1.35rem 1.5rem;
    }

    .anime-title {
        font-size: 1.6rem;
        line-height: 1.25;
        margin-bottom: 1rem;
    }

    .anime-meta {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .anime-synopsis {
        font-size: 0.95rem;
        line-height: 1.7;
        max-height: 460px;
        margin-top: 0;
    }

    .sidebar {
        top: 0;
        margin-top: 0;
        border-radius: 12px;
        position: sticky;
        top: 90px;
    }

    .netflix-season-selector {
        border-radius: 12px 12px 0 0;
    }

    .quality-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .episode-card {
        padding: 1rem 1.1rem;
        font-size: 0.95rem;
    }

    .more-like-this {
        border-radius: 0 0 12px 12px;
        padding: 18px;
    }

    .similar-anime-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0;
        overflow: visible;
    }

    .similar-anime-card {
        min-width: 0;
        max-width: none;
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .similar-anime-image {
        height: 100%;
        min-height: 90px;
    }

    .similar-anime-info {
        padding: 10px 12px;
    }

    .similar-anime-title {
        font-size: 0.55rem;
        line-height: 1.25;
    }

    .similar-anime-genre {
        font-size: 0.72rem;
        padding: 4px 8px;
    }
}

@media (max-width: 1099px) {
    .anime-image {
        height: auto;
    }

    .anime-image img {
        display: block;
        height: auto;
        object-fit: fill;
        object-position: center;
    }

    .anime-card:hover .anime-image img {
        transform: none;
    }
}

@media (min-width: 1100px) and (max-width: 1366px) and (any-pointer: coarse) {
    .anime-image {
        aspect-ratio: auto;
        height: clamp(420px, 52vw, 620px);
    }

    .anime-image img {
        object-fit: contain;
        object-position: center;
        background: #000000;
    }
}

@media (min-width: 1500px) {
    .quality-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .similar-anime-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.comments-section {
    max-width: 1200px;
    margin: 1.5rem auto 3rem;
    padding: 0 0.5rem;
}

.comments-accordion {
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.comments-accordion-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #050505;
    color: #f5f5f5;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.comments-accordion-trigger::-webkit-details-marker {
    display: none;
}

.comments-accordion-trigger::marker {
    font-size: 0;
}

.comments-accordion-trigger:focus-visible {
    outline: 2px solid rgba(255, 107, 107, 0.7);
    outline-offset: -3px;
}

.comments-accordion-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.comments-accordion-icon {
    margin-left: auto;
    color: rgba(245, 245, 245, 0.72);
    transition: transform 0.2s ease, color 0.2s ease;
}

.comments-accordion[open] .comments-accordion-icon {
    transform: rotate(180deg);
    color: #ff8e8e;
}

.comments-card {
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.25rem 1.75rem;
}

.comments-header {
    margin-bottom: 1rem;
}

.comments-header .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
}

.comments-count {
    -webkit-text-fill-color: #f5f5f5;
    color: #f5f5f5;
    background: rgba(255, 107, 107, 0.18);
    border: 1px solid rgba(255, 107, 107, 0.35);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.comments-subtitle {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(245, 245, 245, 0.6);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.comment-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.comment-input,
.comment-textarea {
    width: 100%;
    background: #050505;
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    resize: vertical;
}

.comment-textarea {
    min-height: 90px;
    line-height: 1.5;
}

.comment-input:focus,
.comment-textarea:focus {
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.15);
}

.comment-meta-row {
    display: flex;
    justify-content: flex-end;
}

.comment-word-count {
    font-size: 0.75rem;
    color: rgba(245, 245, 245, 0.5);
}

.comment-word-count.over-limit {
    color: #ff6b6b;
    font-weight: 600;
}

.comment-captcha-row {
    display: flex;
    justify-content: center;
    min-height: 80px;
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.comment-form-status {
    font-size: 0.85rem;
    color: rgba(245, 245, 245, 0.6);
}

.comment-form-status.is-error {
    color: #ff6b6b;
}

.comment-form-status.is-success {
    color: #6bff9c;
}

.comment-submit-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 107, 107, 0.3);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comments-empty {
    text-align: center;
    padding: 1.25rem;
    color: rgba(245, 245, 245, 0.5);
    font-size: 0.9rem;
    background: #000000;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.07);
}

.comment-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.comment-item:hover {
    border-color: rgba(255, 107, 107, 0.25);
    background: #050505;
}

.comment-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.comment-username {
    font-weight: 600;
    color: #f5f5f5;
    font-size: 0.9rem;
}

.comment-time {
    font-size: 0.75rem;
    color: rgba(245, 245, 245, 0.45);
}

.comment-delete-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(255, 107, 107, 0.35);
    color: #ff6b6b;
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.comment-delete-btn:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.15);
    color: #fff;
}

.comment-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-text {
    color: rgba(245, 245, 245, 0.88);
    font-size: 0.92rem;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .detail-flash-stack {
        top: 66px;
        left: 10px;
        right: 10px;
        width: auto;
    }

    .detail-flash {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    .admin-floating-edit {
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
    }

    .comments-section {
        margin: 1rem auto 2rem;
    }
    .comments-card {
        padding: 1rem;
    }
    .comment-form {
        padding: 0.85rem;
    }
    .comment-form-actions {
        justify-content: stretch;
    }
    .comment-submit-btn {
        width: 100%;
        justify-content: center;
    }
    .comment-avatar {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}
