:root {
    --bg: #2A1360;
    --bg-gradient: radial-gradient(circle at 20% 0%, #4B27A3 0%, #2A1360 62%);

    --card: #3A2080;
    --card-2: #4A2A96;
    --card-3: #5A35AB;
    --border: rgba(187, 140, 247, .28);

    --text: #F7F3FF;
    --text-muted: #C4B3E7;

    --primary: #A46CEE;
    --primary-hover: #BB8CF7;
    --accent-mint: #6FE7C0;
    --accent-orchid: #E58BEE;

    --text-main: var(--text);
    --text-soft: var(--text-muted);
    --brand: var(--primary);
    --brand-strong: var(--primary-hover);
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 10px 28px rgba(13, 6, 36, 0.34);
    --shadow-sm: 0 4px 16px rgba(13, 6, 36, 0.26);
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Chakra Petch", "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(900px 520px at 88% 95%, rgba(229, 139, 238, 0.2), transparent 56%),
        radial-gradient(720px 420px at 8% 88%, rgba(111, 231, 192, 0.12), transparent 58%),
        var(--bg-gradient);
    background-attachment: fixed;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto auto 8% 5%;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(164, 108, 238, 0.16);
    border-radius: 26px;
    transform: rotate(12deg);
    pointer-events: none;
}

body::after {
    inset: 14% 4% auto auto;
    width: 140px;
    height: 140px;
    border-color: rgba(111, 231, 192, 0.14);
    transform: rotate(-8deg);
}

.my-auto {
    margin-top: auto;
    margin-bottom: auto;
}

.container {
    width: min(1120px, 92%);
    padding-top: 2.2rem;
    padding-bottom: 2.2rem;
}

.bg-panel {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg) !important;
    backdrop-filter: blur(3px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bg-panel:hover {
    transform: translateY(-1px);
    background: var(--card-2);
    box-shadow: var(--shadow-lg);
}

.title_container {
    font-family: "Syne", sans-serif;
    font-size: clamp(1.05rem, 1.6vw, 1.55rem);
    font-weight: 700;
    color: #fff !important;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.01em;
    margin-bottom: 0.6rem;
}

.title_container a,
.title_container a:hover,
.title_container a:focus,
.title_container a:active,
.title_container a:visited {
    color: #fff !important;
}

.bottom_container {
    font-weight: 600;
    color: var(--text-soft);
    text-align: center;
}

a,
a:hover {
    color: var(--brand-strong);
    text-decoration: none;
}

a:focus {
    outline: 2px dashed rgba(187, 140, 247, 0.75);
    outline-offset: 3px;
}

.cursor-pointer,
.fa-link,
.fa-share-alt,
.fa-search {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    margin-bottom: 0;
}

h1 {
    font-family: "Syne", sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    letter-spacing: 0.02em;
}

.lyric {
    max-height: 260px;
    width: 100%;
    overflow: auto;
    text-align: center;
    direction: rtl;
    padding: 1.2rem;
    color: var(--text-main);
}

.tab-content {
    display: block;
    width: 100%;
    padding: 1rem 1rem 0.5rem;
}

.tab-pane {
    text-align: center !important;
}

.nav-tabs {
    border-bottom: 1px solid rgba(164, 108, 238, 0.22);
    width: min(100%, 760px);
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    overflow: hidden;
}

.tab-nav-wrap {
    display: flex;
    justify-content: center;
}

.nav-tabs .nav-item {
    flex: 1 1 0;
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    font-family: "Syne", sans-serif;
    color: var(--text-soft);
    border: 0;
    border-radius: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 64px;
    padding: 0.95rem 1rem;
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover:focus {
    outline: none;
    box-shadow: none;
}

.nav-tabs .nav-link.active {
    color: var(--brand-strong);
    background: rgba(187, 140, 247, 0.2);
    border-radius: 0 !important;
    border-bottom: 3px solid var(--brand);
}

.table {
    margin-bottom: 0.5rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(111, 231, 192, 0.08);
}

.table th,
.table td {
    border-color: rgba(164, 108, 238, 0.22) !important;
    color: var(--text-main);
}

.table td a,
.table td a:hover,
.table td a:focus,
.table td a:active,
.table td a:visited {
    color: #fff !important;
}

.version {
    font-size: 0.78em;
    color: #fff;
    user-select: none;
}

.footer-meta .fa-heart {
    color: #ff5f7a;
}

.version a,
.version a:hover,
.version a:focus,
.version a:active,
.version a:visited {
    color: #fff !important;
}

.footer-social a,
.footer-social a:hover,
.footer-social a:focus,
.footer-social a:active,
.footer-social a:visited {
    color: #fff !important;
}

.plyr--audio .plyr__controls {
    background: var(--card) !important;
    border-radius: 12px;
    color: var(--text-main) !important;
    box-shadow: 0 0 0 1px rgba(187, 140, 247, 0.18) inset;
}

.plyr {
    width: 100%;
    min-width: 100px;
    --plyr-color-main: var(--primary);
    --plyr-audio-controls-background: var(--card);
    --plyr-audio-control-color: var(--text-main);
    --plyr-audio-control-color-hover: var(--text-main);
    --plyr-audio-control-background-hover: rgba(187, 140, 247, 0.2);
    --plyr-audio-control-background-focus: rgba(187, 140, 247, 0.24);
    --plyr-audio-progress-buffered-background: rgba(255, 255, 255, 0.2);
    --plyr-audio-progress-buffered-background-hover: rgba(255, 255, 255, 0.25);
}

.plyr__control:hover {
    background: rgba(164, 108, 238, 0.24) !important;
}

.plyr__controls,
.plyr__controls button,
.plyr__controls .plyr__control,
.plyr__controls .plyr__time,
.plyr__controls .plyr__time--current,
.plyr__controls .plyr__time--duration,
.plyr__controls .plyr__tooltip {
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
}

.plyr__controls .plyr__control svg,
.plyr__controls .plyr__control svg path {
    fill: currentColor !important;
}

.plyr__controls .plyr__progress__buffer,
.plyr__controls input[type="range"]::-webkit-slider-runnable-track,
.plyr__controls input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.16) !important;
}

.plyr__controls .plyr__progress__buffer {
    border-radius: 999px;
}

.plyr__progress input[type="range"],
.plyr__volume input[type="range"] {
    color: var(--primary);
}

.quality {
    display: flex;
    align-items: stretch;
    margin-top: 0;
    margin-left: 0.65rem;
    min-width: 98px;
}

.quality .custom-select {
    height: 3.25rem;
    border-radius: 16px;
    background: var(--card);
    color: var(--text-main);
    border-color: rgba(187, 140, 247, 0.22);
    box-shadow: 0 0 0 1px rgba(187, 140, 247, 0.22) inset, 0 10px 24px rgba(13, 6, 36, 0.18);
    font-family: "Syne", sans-serif;
    font-weight: 600;
    text-align: center;
    text-align-last: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-top: 0;
    padding-bottom: 0;
}

.quality .custom-select:focus {
    border-color: rgba(187, 140, 247, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(164, 108, 238, 0.18), 0 10px 24px rgba(13, 6, 36, 0.18);
}

.player {
    display: flex;
    align-items: center;
    width: 100% !important;
    gap: 0.95rem;
    padding: 0.65rem 0.55rem 1rem;
}

.single-player-section {
    padding-top: 1.55rem;
    padding-bottom: 1.55rem;
}

.single-player-wrapper {
    margin-top: 1.8rem !important;
    margin-bottom: 1.8rem !important;
}

.player .plyr__controls {
    min-height: 3.15rem;
    border-radius: 16px !important;
    box-shadow: 0 0 0 1px rgba(187, 140, 247, 0.22) inset, 0 10px 24px rgba(13, 6, 36, 0.18) !important;
}

.player:hover .plyr__controls,
.player:focus-within .plyr__controls,
.player .plyr__controls {
    background: var(--card) !important;
    opacity: 1 !important;
}

.custom-select {
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: var(--card-2);
    min-width: 96px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.color-blue-tg {
    color: var(--accent-mint);
}

.color-blue-wa {
    color: #63D6CE;
}

.color-blue-tt {
    color: #6BA6DE;
}

.color-blue-fb {
    color: #6E70D6;
}

.notfound-head h1 {
    text-align: center;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.notfound-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.notfound-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(187, 140, 247, 0.25);
    box-shadow: var(--shadow-sm);
}

.notfound-message {
    max-width: 680px;
    font-size: 1.08rem;
    color: var(--text-main);
}

.notfound-home-btn {
    margin-top: 0.3rem;
    display: inline-block;
    background: rgba(187, 140, 247, 0.2);
    border: 1px solid rgba(187, 140, 247, 0.5);
    color: var(--text-main) !important;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.notfound-home-btn:hover {
    background: rgba(187, 140, 247, 0.35);
    transform: translateY(-1px);
}

.notfound-preview-title {
    font-family: "Syne", sans-serif;
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    color: var(--text-soft);
    letter-spacing: 0.02em;
}

.notfound-preview-image {
    border-radius: 14px;
    border: 1px solid rgba(187, 140, 247, 0.25);
    box-shadow: var(--shadow-sm);
    max-height: 420px;
    object-fit: cover;
}

.related-title {
    font-family: "Syne", sans-serif;
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.search-form .input-group-text.search-submit {
    background: rgba(187, 140, 247, 0.2);
    border: 1px solid rgba(187, 140, 247, 0.5);
    color: var(--text-main);
}

.notfound-search-box {
    width: min(760px, 100%);
}

.search-empty {
    color: var(--text-soft);
}

.top-header-row {
    align-items: stretch;
}

.top-header-row > [class*="col-"] {
    display: flex;
    align-items: center;
}

.top-header-row .header-brand {
    gap: 1.05rem;
}

.top-header-row .search-form {
    width: 100%;
    margin-top: 0 !important;
}

.top-header-row h1,
.top-header-row strong {
    line-height: 1.25;
}

.single-title-link {
    color: #fff;
}

.single-title-link,
.single-title-link:hover,
.single-title-link:focus,
.single-title-link:active {
    color: #fff !important;
}

.single-title-link:hover,
.single-title-link:focus {
    color: #fff !important;
}

.top-header-row .header-brand h1 a,
.top-header-row .header-brand h1 a:hover,
.top-header-row .header-brand h1 a:focus,
.top-header-row .header-brand h1 a:active {
    color: #fff !important;
}

.share-tab-panel .input-group-text,
.share-tab-panel .form-control {
    border-color: rgba(187, 140, 247, 0.35);
}

.related-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(42, 19, 96, 0.35);
    border: 1px solid rgba(187, 140, 247, 0.28);
    border-radius: 12px;
    padding: 0.55rem;
    height: 100%;
}

.related-card:hover {
    background: rgba(90, 53, 171, 0.35);
}

.related-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(187, 140, 247, 0.3);
}

.related-name {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.3;
}

.search-meta {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.77rem;
    color: var(--text-soft);
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-panel {
    animation: reveal-up 0.45s ease both;
}

.row.mt-3.bg-panel.rounded:nth-of-type(2) {
    animation-delay: 0.08s;
}

.row.mt-3.bg-panel.rounded:nth-of-type(3) {
    animation-delay: 0.16s;
}

@media screen and (max-width: 768px) {
    .container {
        width: min(720px, 94%);
        padding-top: 1.3rem;
    }

    .top-header-row {
        gap: 0.5rem;
    }

    .top-header-row > [class*="col-"] {
        align-items: flex-start;
    }

    .top-header-row .header-brand,
    .top-header-row .search-form {
        margin-top: 0 !important;
    }

    .top-header-row .header-brand {
        gap: 0.8rem;
    }

    .top-header-row h1 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .player {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.55rem 0.35rem 0.85rem;
    }

    .quality {
        margin-left: 0;
        width: 100%;
    }

    .quality .custom-select {
        width: 100%;
        height: 2.9rem;
        text-align: center;
        text-align-last: center;
    }

    .title_container {
        font-size: 1.08rem;
    }

    .single-player-wrapper {
        margin-top: 1.55rem !important;
        margin-bottom: 1.55rem !important;
    }

    .single-player-section {
        padding-top: 1.1rem;
        padding-bottom: 1.1rem;
    }

    .footer-meta,
    .footer-social {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .footer-meta {
        padding-bottom: 0.4rem !important;
    }

    .footer-social {
        padding-top: 0.4rem !important;
    }

    .footer-meta {
        line-height: 1.7;
    }
}

@media screen and (max-width: 420px) {
    .plyr__time,
    .plyr__volume {
        display: none;
    }

    .nav-tabs .nav-link {
        padding: 0.7rem 0.65rem;
        font-size: 0.92rem;
    }

    body::before,
    body::after {
        display: none;
    }

    .top-header-row .header-brand {
        gap: 0.65rem;
    }

    .top-header-row .header-brand h1,
    .top-header-row .header-brand h1 a {
        font-size: 0.95rem;
        line-height: 1.15;
    }

    .quality .custom-select {
        height: 2.65rem;
    }
}
