/* ==========================================================================
       Re:ANIME Detail Style (Hero, Poster, Meta, Stats, Relations)
       ========================================================================== */

    .re-detail-wrapper {
        position: relative;
        width: 100%;
        margin-bottom: clamp(20px, 2.5vw, 32px);
    }

    /* Ambient Blur Banner Backdrop */
    .re-banner-wrap {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: clamp(290px, calc(20px + 25.5vw), 362px);
        overflow: hidden;
        border-radius: clamp(12px, 2vw, 18px);
        border: 1px solid var(--line);
        background: #0d121c;
        pointer-events: none;
        z-index: 0;
    }

    .re-banner-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(12px) brightness(0.38);
        transform: scale(1.08);
        user-select: none;
    }

    .re-banner-gradient {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(180deg, rgba(10, 13, 20, 0.15) 0%, rgba(10, 13, 20, 0.65) 55%, rgba(10, 13, 20, 0.95) 85%, #0d121c 100%);
    }

    .re-banner-dots {
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        opacity: 0.35;
        background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
        background-size: 6px 6px;
    }

    /* Hero Main Content Row */
    .re-hero-content {
        position: relative;
        z-index: 10;
        display: flex;
        gap: clamp(18px, 2.5vw, 36px);
        margin-top: 0;
        padding: clamp(14px, 1.5vw, 18px);
    }

    /* Left Poster Column */
    .re-poster-col {
        width: clamp(190px, 18vw, 240px);
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .re-poster-box {
        width: 100%;
        aspect-ratio: 5/7;
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
        background: #000;
        position: relative;
    }

    .re-poster-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    .re-poster-box:hover .re-poster-img {
        transform: scale(1.03);
    }

    /* Left Metadata Card (Re:ANIME style) */
    .re-meta-card {
        background: rgba(18, 23, 34, 0.65);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 16px;
        backdrop-filter: blur(12px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .re-meta-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .re-meta-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .re-meta-label {
        font-size: 11.5px;
        font-weight: 700;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    .re-meta-val {
        font-size: 13px;
        font-weight: 600;
        color: #f1f5f9;
        text-align: right;
        word-break: break-word;
    }

    .re-external-links {
        border-top: 1px solid var(--line);
        padding-top: 12px;
        margin-top: 4px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .re-ext-link {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: #94a3b8;
        text-decoration: none;
        transition: color 0.15s ease;
    }

    .re-ext-link:hover {
        color: #fff;
    }

    .re-ext-link i.arrow {
        margin-left: auto;
        font-size: 11px;
        color: #64748b;
    }

    /* Right Info Column */
    .re-info-col {
        flex: 1;
        min-width: 0;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* Title Block */
    .re-title-block {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .re-main-title {
        font-size: clamp(24px, 4vw, 36px);
        font-weight: 800;
        color: #fff;
        line-height: 1.25;
        letter-spacing: -0.01em;
        margin: 0;
    }

    .re-alt-title {
        font-size: clamp(13px, 2vw, 15px);
        color: var(--muted);
        font-weight: 500;
    }

    /* Synopsis / Description with Read More */
    .re-synopsis-wrap {
        position: relative;
    }

    .re-synopsis-text {
        font-size: 14px;
        line-height: 1.75;
        color: #cbd5e1;
        overflow: hidden;
        transition: max-height 0.35s ease;
        max-height: 110px;
    }

    .re-synopsis-text.expanded {
        max-height: 2000px;
    }

    .re-synopsis-fade {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: linear-gradient(to bottom, transparent, var(--bg));
        display: flex;
        align-items: flex-end;
        justify-content: center;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .re-synopsis-wrap.is-expanded .re-synopsis-fade {
        opacity: 0;
        pointer-events: none;
    }

    .re-synopsis-toggle-btn {
        background: transparent;
        border: none;
        color: var(--accent);
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        padding: 4px 8px;
        pointer-events: auto;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .re-synopsis-toggle-btn:hover {
        filter: brightness(1.15);
    }

    /* Genre Tags */
    .re-genres-wrap {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .re-genre-pill {
        font-size: 12px;
        font-weight: 600;
        padding: 5px 12px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #cbd5e1;
        text-decoration: none;
        transition: all 0.15s ease;
    }

    .re-genre-pill:hover {
        background: var(--surface-hover);
        color: var(--accent);
        border-color: rgba(38, 163, 214, 0.35);
        transform: translateY(-1px);
    }

    /* Action Buttons Row */
    .re-actions-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .re-btn-watch {
        background: var(--accent);
        color: #04201c;
        font-weight: 800;
        font-size: 14px;
        height: 42px;
        padding: 0 22px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 16px var(--accent-glow);
        text-decoration: none;
        transition: all 0.15s ease;
    }

    .re-btn-watch:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
        color: #04201c;
    }

    .re-btn-action {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #fff;
        font-weight: 600;
        font-size: 14px;
        height: 42px;
        padding: 0 18px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        transition: all 0.15s ease;
        user-select: none;
    }

    .re-btn-action:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.35);
    }

    /* Quick Badges Row */
    .re-badges-row {
        display: none !important;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .re-badge {
        font-family: var(--mono);
        font-size: 11px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #cbd5e1;
        text-transform: uppercase;
    }

    .re-badge.accent {
        background: rgba(38, 163, 214, 0.12);
        color: var(--accent);
        border-color: rgba(38, 163, 214, 0.3);
    }

    .re-badge.score {
        background: rgba(234, 179, 8, 0.14);
        color: #eab308;
        border-color: rgba(234, 179, 8, 0.3);
    }

    /* Details Card (Alternative Titles, Studios, Stats) */
    .re-details-card {
        background: rgba(18, 23, 34, 0.65);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: clamp(16px, 2.5vw, 24px);
        backdrop-filter: blur(12px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 6px;
    }

    .re-card-section {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .re-card-heading {
        font-size: 14px;
        font-weight: 700;
        color: #fff;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .re-alt-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .re-alt-pill {
        font-size: 12px;
        color: var(--muted);
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        padding: 3px 8px;
        border-radius: 4px;
    }

    .re-studio-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .re-studio-pill {
        font-size: 12.5px;
        font-weight: 600;
        color: #cbd5e1;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 4px 10px;
        border-radius: 6px;
        text-decoration: none;
        transition: all 0.15s ease;
    }

    .re-studio-pill:hover {
        background: var(--surface-hover);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Stats Grid */
    .re-stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .re-stat-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        padding: 10px;
        text-align: center;
    }

    .re-stat-label {
        font-size: 11px;
        font-weight: 600;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 2px;
    }

    .re-stat-val {
        font-size: 18px;
        font-weight: 800;
        color: #fff;
        font-family: var(--mono);
    }

    /* Related Seasons & Series (Re:ANIME 80px Card Style) */
    .re-relations-section {
        border-top: 1px solid var(--line);
        padding-top: 20px;
        margin-top: 4px;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .re-relations-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 12px;
    }

    .re-relation-card {
        position: relative;
        height: 80px;
        width: 100%;
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.25s ease;
        background: #000;
    }

    .re-relation-card:hover {
        transform: scale(1.02);
        border-color: rgba(38, 163, 214, 0.4);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }

    .re-relation-card.is-active {
        border: 2px solid var(--accent) !important;
        box-shadow: 0 0 16px var(--accent-glow) !important;
        cursor: default;
        background: rgba(38, 163, 214, 0.03);
    }

    .re-relation-card.is-active .re-relation-img {
        filter: blur(2px) brightness(0.45);
    }

    .re-relation-card.is-active .re-relation-badge {
        color: var(--accent);
        background: rgba(38, 163, 214, 0.14);
        border: 1px solid rgba(38, 163, 214, 0.3);
        padding: 1px 8px;
        border-radius: 4px;
        font-weight: 800;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    }

    .re-relation-card.is-active .re-relation-title {
        color: #fff;
        font-weight: 800;
    }

    .re-relation-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .re-relation-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(2px) brightness(0.45);
        transition: filter 0.25s ease;
    }

    .re-relation-card:hover .re-relation-img {
        filter: blur(2px) brightness(0.55);
    }

    .re-relation-dots {
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        opacity: 0.4;
        background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
        background-size: 6px 6px;
    }

    .re-relation-info {
        position: relative;
        z-index: 2;
        width: 100%;
        padding: 0 12px;
        text-align: center;
    }

    .re-relation-badge {
        display: block;
        font-size: 9.5px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--accent);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .re-relation-title {
        margin: 2px 0;
        font-size: 12.5px;
        font-weight: 700;
        color: #f1f5f9;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .re-relation-card:hover .re-relation-title {
        color: #fff;
    }

    .re-relation-meta {
        font-size: 10px;
        color: #94a3b8;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    }

    /* ==========================================================================
       Episodes Section (Full Width, Without Sidebar)
       ========================================================================== */

    .episodes-section {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: clamp(14px, 2vw, 18px);
        padding: clamp(16px, 3vw, 28px);
        margin-bottom: 36px;
    }

    .ep-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .ep-search-input {
        background: var(--surface-card);
        border: 1px solid var(--line);
        border-radius: 8px;
        color: #fff;
        padding: 6px 12px;
        font-size: 12px;
        outline: none;
        width: 140px;
        transition: border-color 0.15s ease;
    }

    .ep-search-input:focus {
        border-color: var(--accent);
    }

    .episodes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 18vw, 130px), 1fr));
        gap: clamp(8px, 1.2vw, 12px);
        max-height: 480px;
        overflow-y: auto;
        padding-right: 4px;
    }

    .ep-item-btn {
        background: var(--surface-card);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 8px 10px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        transition: all 0.15s ease;
    }

    .ep-item-btn:hover {
        background: var(--surface-hover);
        border-color: var(--accent);
        transform: translateY(-2px);
    }

    .ep-num {
        font-family: var(--mono);
        font-size: 13px;
        font-weight: 800;
        color: #fff;
    }

    .ep-audio {
        font-size: 9.5px;
        font-weight: 700;
        color: var(--muted);
        display: flex;
        justify-content: center;
        gap: 4px;
    }

    /* ==========================================================================
       Responsive Breakpoints (Zero dead space, compact mobile layout)
       ========================================================================== */

    @media (max-width: 900px) {
        .re-banner-wrap {
            min-height: auto;
            height: 216px;
        }

        .re-hero-content {
            flex-direction: column;
            align-items: center;
            text-align: center;
            margin-top: 0;
            padding: 12px 10px;
            gap: 12px;
        }

        .re-poster-col {
            width: 140px;
            margin: 0 auto;
            gap: 10px;
        }

        .re-poster-box {
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
            border-radius: 10px;
        }

        .re-info-col {
            padding-top: 0;
            width: 100%;
            gap: 12px;
        }

        .re-main-title {
            font-size: clamp(18px, 5vw, 24px);
            text-align: center;
        }

        .re-alt-title {
            font-size: 13px;
            text-align: center;
        }

        .re-synopsis-text {
            font-size: 13.5px;
            line-height: 1.6;
            text-align: left;
            max-height: 85px;
        }

        .re-genres-wrap,
        .re-actions-row,
        .re-badges-row,
        .re-alt-pills,
        .re-studio-pills {
            justify-content: center;
        }

        .re-genre-pill {
            font-size: 11px;
            padding: 4px 10px;
        }

        .re-actions-row {
            gap: 8px;
            width: 100%;
        }

        .re-btn-watch {
            flex: 1;
            min-width: 130px;
            height: 38px;
            font-size: 13px;
            padding: 0 14px;
            justify-content: center;
        }

        .re-btn-action {
            height: 38px;
            font-size: 13px;
            padding: 0 12px;
        }

        .re-badges-row {
        display: none !important;
            gap: 5px;
        }

        .re-badge {
            font-size: 10.5px;
            padding: 3px 8px;
        }

        .re-details-card {
            padding: 14px 12px;
            gap: 14px;
            margin-top: 4px;
        }

        .re-card-heading {
            font-size: 13px;
            justify-content: center;
        }

        .re-stats-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

        .re-stat-box {
            padding: 8px 6px;
        }

        .re-stat-val {
            font-size: 15px;
        }

        .re-relations-section {
            padding-top: 14px;
            gap: 10px;
        }

        .re-relations-grid {
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 8px;
        }

        .re-relation-card {
            height: 68px;
        }

        .episodes-section {
            padding: 14px 12px;
            margin-bottom: 20px;
        }

        .ep-header {
            margin-bottom: 12px;
        }
    }

    @media (max-width: 480px) {
        .re-actions-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            width: 100%;
        }

        .re-btn-watch {
            grid-column: 1 / -1;
            width: 100%;
        }

        .re-btn-action {
            width: 100%;
            justify-content: center;
        }

        .episodes-grid {
            grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
            gap: 6px;
            max-height: 360px;
        }

        .ep-item-btn {
            padding: 6px 4px;
        }

        .ep-num {
            font-size: 12px;
        }
    }

    /* Re:ANIME Watchlist Dropdown */
    .re-watchlist-dropdown-wrap {
        position: relative;
        display: inline-block;
    }

    .re-btn-action.is-active-watchlist {
        border-color: var(--accent) !important;
        color: var(--accent) !important;
        background: rgba(38, 163, 214, 0.12) !important;
    }

    .watchlist-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 230px;
        background: #0d121d;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 16px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
        z-index: 1050;
        padding: 8px;
        display: none;
        backdrop-filter: blur(16px);
        animation: dropSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .watchlist-dropdown-menu.show {
        display: block;
    }

    @keyframes dropSlideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .watchlist-dropdown-header {
        padding: 6px 12px 8px;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #64748b;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        margin-bottom: 6px;
    }

    .watchlist-options-list {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .watchlist-opt-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 9px 12px;
        background: transparent;
        border: none;
        border-radius: 10px;
        color: #cbd5e1;
        font-size: 13.5px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s ease;
        text-align: left;
    }

    .watchlist-opt-btn .opt-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .watchlist-opt-btn .opt-left i {
        font-size: 14px;
    }

    .watchlist-opt-btn .check-indicator {
        display: none;
        font-size: 16px;
        color: var(--accent);
        font-weight: 700;
    }

    .watchlist-opt-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    .watchlist-opt-btn.is-selected {
        background: rgba(38, 163, 214, 0.14);
        color: #fff;
        font-weight: 700;
    }

    .watchlist-opt-btn.is-selected .check-indicator {
        display: inline-block;
    }

    .watchlist-dropdown-footer {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }

    .watchlist-remove-btn {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: transparent;
        border: none;
        border-radius: 8px;
        color: #f87171;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.15s ease;
    }

    .watchlist-remove-btn:hover {
        background: rgba(239, 68, 68, 0.14);
        color: #ef4444;
    }