/* =========================================
   TARANESORA — SONG DETAIL PAGE
========================================= */

html,
body {
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* PAGE */

.song-detail-page {
    width: 100%;
    min-height: 100vh;

    padding: 170px 32px 100px;

    position: relative;
    z-index: 2;

    overflow-x: hidden;
}

.song-detail-container {
    width: 100%;
    max-width: 1380px;

    margin: 0 auto;
}

/* BACK LINK */

.song-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 38px;

    padding: 0 18px;

    margin-bottom: 24px;

    border-radius: 999px;

    color: rgba(255,255,255,0.72);

    background:
    linear-gradient(
        180deg,
        rgba(255,255,255,0.07),
        rgba(255,255,255,0.025)
    );

    border: 1px solid rgba(255,255,255,0.07);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.song-back-link:hover {
    color: #fff;

    background:
    linear-gradient(
        180deg,
        rgba(255,255,255,0.11),
        rgba(255,255,255,0.04)
    );

    transform: translateY(-1px);
}

/* HERO */

.song-detail-hero {
    width: 100%;

    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);

    gap: 54px;

    align-items: center;

    padding: 34px;

    border-radius: 42px;

    position: relative;

    overflow: hidden;

    background:
    radial-gradient(
        circle at top right,
        rgba(255,255,255,0.09),
        transparent 48%
    ),
    linear-gradient(
        135deg,
        rgba(255,255,255,0.055),
        rgba(255,255,255,0.018)
    );

    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);

    box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 30px 90px rgba(0,0,0,0.28);
}

.song-detail-hero::before {
    content: '';

    position: absolute;
    inset: -30%;

    background:
    radial-gradient(
        circle at 20% 20%,
        rgba(218,188,133,0.10),
        transparent 38%
    );

    pointer-events: none;
}

/* COVER */

.song-detail-cover {
    width: 100%;
    aspect-ratio: 1 / 1;

    border-radius: 34px;

    overflow: hidden;

    position: relative;
    z-index: 2;

    box-shadow:
    0 0 70px rgba(255,255,255,0.08),
    0 28px 80px rgba(0,0,0,0.30);
}

.song-detail-cover img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

/* MAIN */

.song-detail-main {
    position: relative;
    z-index: 2;

    min-width: 0;
}

.song-detail-kicker {
    display: inline-flex;

    margin-bottom: 18px;

    padding: 8px 14px;

    border-radius: 999px;

    color: rgba(255,255,255,0.62);

    background: rgba(255,255,255,0.045);

    border: 1px solid rgba(255,255,255,0.055);

    font-size: 12px;
    font-weight: 800;
}

.song-detail-main h1 {
    margin: 0 0 14px;

    color: #fff;

    font-size: 64px;
    line-height: 1.12;
    font-weight: 950;

    letter-spacing: -2px;
}

.song-detail-subtitle {
    margin: 0 0 34px;

    color: rgba(255,255,255,0.46);

    font-size: 17px;
    line-height: 1.9;
}

/* PLAYER */

.song-detail-player {
    width: 100%;
    max-width: 560px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;

    margin-bottom: 28px;
}

.song-detail-play {
    width: 82px;
    height: 82px;

    border-radius: 50%;

    border: none;
    outline: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    background:
    radial-gradient(
        circle at top,
        rgba(255,255,255,0.18),
        rgba(255,255,255,0.07)
    );

    box-shadow:
    0 0 34px rgba(255,255,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.12);

    transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.song-detail-play:hover {
    transform: scale(1.04);
}

.song-detail-play span {
    width: 0;
    height: 0;

    display: block;

    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 19px solid #fff;

    margin-left: 5px;
}

.song-detail-play.is-playing span {
    width: 20px;
    height: 24px;

    border: none;

    margin-left: 0;

    background:
    linear-gradient(
        90deg,
        #fff 0 7px,
        transparent 7px 13px,
        #fff 13px 20px
    );
}

.song-detail-time {
    width: 100%;
    max-width: 520px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 7px;

    direction: ltr;

    color: rgba(255,255,255,0.55);

    font-size: 13px;
    font-weight: 800;

    font-variant-numeric: tabular-nums;
}

.song-detail-progress {
    width: 100%;
    max-width: 520px;

    height: 7px;

    border-radius: 999px;

    overflow: hidden;

    cursor: pointer;

    background: rgba(255,255,255,0.08);
}

.song-detail-progress-bar {
    width: 0%;
    height: 100%;

    border-radius: inherit;

    background:
    linear-gradient(
        90deg,
        rgba(218,188,133,0.55),
        rgba(255,255,255,0.95)
    );

    transition: width 0.08s linear;
}

/* ACTIONS */

.song-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;
}

.song-detail-like,
.song-detail-listens,
.song-detail-share {
    min-height: 40px;

    padding: 0 15px;

    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: rgba(255,255,255,0.78);

    background:
    linear-gradient(
        180deg,
        rgba(255,255,255,0.09),
        rgba(255,255,255,0.035)
    );

    border: 1px solid rgba(255,255,255,0.075);

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    outline: none;

    box-shadow:
    0 5px 20px rgba(255,255,255,0.035);
}

.song-detail-like,
.song-detail-share {
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    -webkit-tap-highlight-color: transparent;
}

.song-detail-like.liked {
    color: #fff;

    background:
    linear-gradient(
        180deg,
        rgba(255,255,255,0.15),
        rgba(255,255,255,0.06)
    );
}

.song-detail-like.liked .song-detail-like-icon {
    color: #ff6b8a;
}

.song-detail-actions em {
    font-style: normal;

    color: rgba(255,255,255,0.44);

    font-size: 12px;
    font-weight: 700;
}

.song-detail-share span {
    width: 13px;
    height: 13px;

    display: inline-block;

    position: relative;
}

.song-detail-share span::before {
    content: '';

    position: absolute;

    width: 10px;
    height: 1.5px;

    background: rgba(255,255,255,0.75);

    left: 1px;
    top: 6px;

    transform: rotate(-45deg);

    border-radius: 999px;
}

.song-detail-share span::after {
    content: '';

    position: absolute;

    width: 6px;
    height: 6px;

    border-top: 1.5px solid rgba(255,255,255,0.75);
    border-right: 1.5px solid rgba(255,255,255,0.75);

    right: 1px;
    top: 1px;
}

/* GRID BELOW */

.song-detail-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);

    gap: 28px;

    margin-top: 34px;
}

/* INFO */

.song-detail-info,
.song-detail-lyrics,
.song-detail-analysis,
.song-detail-comments-placeholder,
.song-not-found {
    border-radius: 34px;

    background:
    linear-gradient(
        135deg,
        rgba(255,255,255,0.045),
        rgba(255,255,255,0.017)
    );

    border: 1px solid rgba(255,255,255,0.07);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.035),
    0 22px 70px rgba(0,0,0,0.20);
}

.song-detail-info {
    padding: 28px;
    align-self: start;
}

.song-detail-info h2,
.song-detail-lyrics h2,
.song-detail-analysis h2,
.song-detail-comments-placeholder h2,
.song-not-found h1 {
    margin: 0 0 22px;

    color: #fff;

    font-size: 24px;
    line-height: 1.4;
    font-weight: 900;
}

.song-detail-info-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}

.song-detail-info-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    min-height: 44px;

    padding: 10px 0;

    border-bottom: 1px solid rgba(255,255,255,0.055);
}

.song-detail-info-list div:last-child {
    border-bottom: none;
}

.song-detail-info-list span {
    color: rgba(255,255,255,0.42);

    font-size: 13px;
    font-weight: 700;
}

.song-detail-info-list strong {
    color: rgba(255,255,255,0.82);

    font-size: 14px;
    font-weight: 800;

    text-align: left;
}

/* LYRICS */

.song-detail-lyrics {
    padding: 32px 42px;
}

.song-detail-lyrics-text {
    display: flex;
    flex-direction: column;

    gap: 14px;
}

.song-detail-lyrics-text p {
    margin: 0;

    color: rgba(255,255,255,0.76);

    font-size: 21px;
    line-height: 2.25;
    font-weight: 700;
}

.song-detail-empty {
    color: rgba(255,255,255,0.45);

    font-size: 16px;
    line-height: 2;
}

/* ANALYSIS */

.song-detail-analysis {
    margin-top: 28px;

    padding: 30px 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;
}

.song-detail-analysis span {
    display: inline-flex;

    margin-bottom: 10px;

    color: rgba(218,188,133,0.82);

    font-size: 12px;
    font-weight: 900;
}

.song-detail-analysis h2 {
    margin-bottom: 10px;
}

.song-detail-analysis p {
    margin: 0;

    color: rgba(255,255,255,0.58);

    font-size: 15px;
    line-height: 2;
}

.song-detail-analysis a,
.song-not-found a {
    min-width: max-content;

    height: 42px;

    padding: 0 18px;

    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #fff;

    background:
    linear-gradient(
        180deg,
        rgba(218,188,133,0.20),
        rgba(255,255,255,0.05)
    );

    border: 1px solid rgba(218,188,133,0.28);

    font-size: 13px;
    font-weight: 900;

    text-decoration: none;
}

/* COMMENTS PLACEHOLDER */

.song-detail-comments-placeholder {
    margin-top: 28px;

    padding: 30px 34px;
}

.song-detail-comments-placeholder p,
.song-not-found p {
    margin: 0;

    color: rgba(255,255,255,0.52);

    font-size: 15px;
    line-height: 2;
}

/* NOT FOUND */

.song-not-found {
    padding: 46px;

    text-align: center;
}

/* RESPONSIVE */

@media (max-width: 1100px) {

    .song-detail-hero {
        grid-template-columns: 340px minmax(0, 1fr);
        gap: 34px;
    }

    .song-detail-main h1 {
        font-size: 48px;
    }

    .song-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .song-detail-page {
        padding: 130px 12px 70px;
    }

    .song-detail-container {
        max-width: 100%;
    }

    .song-back-link {
        height: 36px;

        margin-bottom: 18px;

        font-size: 12px;
    }

    .song-detail-hero {
        grid-template-columns: 1fr;

        gap: 26px;

        padding: 14px;

        border-radius: 30px;
    }

    .song-detail-cover {
        border-radius: 26px;
    }

    .song-detail-main {
        padding: 2px 6px 10px;
    }

    .song-detail-kicker {
        margin-bottom: 14px;
    }

    .song-detail-main h1 {
        font-size: 38px;
        line-height: 1.25;

        letter-spacing: -1px;
    }

    .song-detail-subtitle {
        margin-bottom: 26px;

        font-size: 15px;
    }

    .song-detail-player {
        align-items: center;

        max-width: 100%;
    }

    .song-detail-time {
        justify-content: center;
    }

    .song-detail-progress {
        max-width: 100%;
    }

    .song-detail-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));

        width: 100%;

        gap: 8px;
    }

    .song-detail-like,
    .song-detail-listens,
    .song-detail-share {
        width: 100%;

        min-height: 40px;

        padding: 0 8px;

        font-size: 12px;
    }

    .song-detail-actions em {
        display: none;
    }

    .song-detail-grid {
        margin-top: 20px;

        gap: 20px;
    }

    .song-detail-info,
    .song-detail-lyrics,
    .song-detail-analysis,
    .song-detail-comments-placeholder {
        border-radius: 26px;
    }

    .song-detail-info {
        padding: 24px 20px;
    }

    .song-detail-lyrics {
        padding: 26px 22px;
    }

    .song-detail-lyrics-text p {
        font-size: 18px;
        line-height: 2.2;
    }

    .song-detail-analysis {
        flex-direction: column;
        align-items: flex-start;

        padding: 26px 22px;
    }

    .song-detail-analysis a {
        width: 100%;
    }

    .song-detail-comments-placeholder {
        padding: 26px 22px;
    }
}

@media (max-width: 480px) {

    .song-detail-main h1 {
        font-size: 34px;
    }

    .song-detail-play {
        width: 72px;
        height: 72px;
    }

    .song-detail-actions {
        grid-template-columns: 1fr;
    }

    .song-detail-like,
    .song-detail-listens,
    .song-detail-share {
        justify-content: center;
    }
}

/* =========================================
   FINAL BEAUTY PASS — SONG DETAIL
========================================= */

/* پلیر وسط و سینمایی‌تر */

.song-detail-player {
    align-items: center !important;
    justify-content: center !important;

    max-width: 620px !important;

    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 30px !important;
}

.song-detail-play {
    margin-left: auto !important;
    margin-right: auto !important;

    width: 88px !important;
    height: 88px !important;

    background:
    radial-gradient(
        circle at top,
        rgba(255,255,255,0.22),
        rgba(255,255,255,0.075)
    ) !important;

    box-shadow:
    0 0 42px rgba(255,255,255,0.10),
    0 0 90px rgba(218,188,133,0.07),
    inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

/* زمان: واضح‌تر، لطیف‌تر، بالای پروگرس */

.song-detail-time {
    max-width: 540px !important;

    justify-content: flex-start !important;

    margin-left: auto !important;
    margin-right: auto !important;

    color: rgba(255,255,255,0.74) !important;

    font-size: 16px !important;
    font-weight: 900 !important;

    letter-spacing: 0.4px;

    text-shadow:
    0 0 18px rgba(255,255,255,0.16);

    opacity: 0.92;
}

/* پروگرس بار وسط */

.song-detail-progress {
    max-width: 540px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    height: 7px !important;

    background:
    rgba(255,255,255,0.075) !important;
}

/* اکشن‌ها وسط */

.song-detail-actions {
    justify-content: center !important;

    width: 100% !important;

    margin-left: auto !important;
    margin-right: auto !important;
}

/* عنوان و متن اصلی در hero کمی متعادل‌تر */

.song-detail-main {
    text-align: center;
}

.song-detail-kicker {
    margin-left: auto;
    margin-right: auto;
}

.song-detail-subtitle {
    text-align: center;
}

/* =========================================
   TOP GRID — INFO + ANALYSIS
========================================= */

.song-detail-top-grid {
    display: grid;

    grid-template-columns: 360px minmax(0, 1fr);

    gap: 28px;

    margin-top: 34px;
}

/* چون تحلیل حالا داخل گرید است، margin قبلی حذف شود */

.song-detail-top-grid .song-detail-analysis {
    margin-top: 0 !important;

    height: 100%;

    align-self: stretch;
}

/* کارت تحلیل در حالت جدید */

.song-detail-analysis {
    min-height: 100%;

    align-items: center;
}

.song-detail-analysis-empty {
    opacity: 0.72;
}

/* متن کامل ترانه بعد از دو کارت بالا */

.song-detail-lyrics {
    margin-top: 28px;
}

/* متن کامل ترانه خواناتر و شاعرانه‌تر */

.song-detail-lyrics h2 {
    font-size: 28px !important;
}

.song-detail-lyrics-text {
    max-width: 860px;

    margin-left: auto;
    margin-right: auto;

    text-align: center;
}

.song-detail-lyrics-text p {
    font-size: 23px !important;

    line-height: 2.35 !important;

    color: rgba(255,255,255,0.80) !important;

    text-shadow:
    0 0 18px rgba(255,255,255,0.055);
}

/* نظر مخاطبان بعد از متن کامل */

.song-detail-comments-placeholder {
    margin-top: 28px !important;
}

/* =========================================
   RESPONSIVE FINAL
========================================= */

@media (max-width: 1100px) {

    .song-detail-top-grid {
        grid-template-columns: 1fr;
    }

    .song-detail-analysis {
        flex-direction: column;
        align-items: flex-start;
    }

    .song-detail-analysis a {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .song-detail-main {
        text-align: right;
    }

    .song-detail-kicker {
        margin-left: 0;
        margin-right: 0;
    }

    .song-detail-subtitle {
        text-align: right;
    }

    .song-detail-player {
        max-width: 100% !important;
    }

    .song-detail-play {
        width: 76px !important;
        height: 76px !important;
    }

    .song-detail-time {
        max-width: 100% !important;

        font-size: 14px !important;
    }

    .song-detail-progress {
        max-width: 100% !important;
    }

    .song-detail-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;

        justify-content: center !important;
    }

    .song-detail-top-grid {
        margin-top: 22px;

        gap: 20px;
    }

    .song-detail-lyrics {
        margin-top: 20px;
    }

    .song-detail-lyrics h2 {
        font-size: 24px !important;
    }

    .song-detail-lyrics-text {
        text-align: right;
    }

    .song-detail-lyrics-text p {
        font-size: 19px !important;

        line-height: 2.25 !important;
    }
}

@media (max-width: 480px) {

    .song-detail-actions {
        grid-template-columns: 1fr !important;
    }

    .song-detail-lyrics-text p {
        font-size: 18px !important;
    }
}
/* =========================================
   LIVE LYRICS — SONG DETAIL
========================================= */

.song-detail-live-lyrics {
    width: 100%;
    max-width: 620px;

    min-height: 120px;

    margin: 10px auto 0;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    overflow: hidden;
}

.song-detail-live-lyrics-inner {
    width: 100%;
    min-height: 110px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

.song-detail-live-line {
    display: none;

    max-width: 100%;

    color: #fff;

    font-size: 28px;
    line-height: 2;
    font-weight: 900;

    text-align: center;

    opacity: 0;

    transform: translateY(8px);

    text-shadow:
    0 0 24px rgba(255,255,255,0.30);

    transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    text-shadow 0.35s ease;
}

.song-detail-live-line.active {
    display: block;

    opacity: 1;

    transform: translateY(0);
}

.song-detail-live-line.is-empty {
    display: block;

    font-size: 16px;
    font-weight: 700;

    opacity: 0.38;

    text-shadow: none;
}

/* موبایل */

@media (max-width: 768px) {

    .song-detail-live-lyrics {
        min-height: 100px;

        margin-top: 8px;
    }

    .song-detail-live-lyrics-inner {
        min-height: 96px;
    }

    .song-detail-live-line {
        font-size: 22px;
        line-height: 2;
    }
}

@media (max-width: 480px) {

    .song-detail-live-line {
        font-size: 20px;
    }
}
/* =========================================
   MICRO ANIMATION — DETAIL LIKE HEART
========================================= */

.song-detail-like.liked .song-detail-like-icon {
    animation:
    tsDetailHeartBeat 0.42s ease;
}

@keyframes tsDetailHeartBeat {

    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.35);
    }

    65% {
        transform: scale(0.92);
    }

    100% {
        transform: scale(1);
    }
}