@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #090a0f;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #f1f5f9;
    --btn-bg: #ffffff;
    --btn-border: #cbd5e1;
    --btn-text: #1e293b;
    --btn-hover-bg: #0f172a;
    --btn-hover-text: #ffffff;
    --brand-accent: #00f0ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
    color: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ambient-bg {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(55px) brightness(0.68) saturate(1.25);
    z-index: 1;
    transform: scale(1.08);
    transition: background-image 0.6s ease;
    pointer-events: none;
}

.ambient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.22) 0%, rgba(10, 15, 29, 0.76) 100%);
    z-index: 2;
    pointer-events: none;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090a0f;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    height: 11px;
    aspect-ratio: 4;
    display: grid;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.8)) drop-shadow(0 1px 6px rgba(255, 255, 255, 0.12));
}

.loader:before,
.loader:after {
    content: "";
    grid-area: 1/1;
    --_g: no-repeat radial-gradient(farthest-side, #ffffff calc(100% - 0.8px), rgba(255, 255, 255, 0) 100%);
    background:
        var(--_g) left,
        var(--_g) right;
    background-size: 25% 100%;
    animation: l34 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform: translate(var(--d, 0)) rotate(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.loader:after {
    --d: 37.5%;
    animation-delay: .5s;
}

@keyframes l34 {
    50%, 100% {
        transform: translate(var(--d, 0)) rotate(.5turn);
    }
}

.main-stage {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 60px 18px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-stage.visible {
    opacity: 1;
    transform: translateY(0);
}

.artwork-frame {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    background: #11141d;
    cursor: pointer;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.artwork-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 2;
    transform: translate3d(0, 0, 0);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.track-count-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    pointer-events: auto;
    background: rgba(18, 18, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.95);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.track-count-badge:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

.track-count-badge.selected,
.track-count-badge.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.65);
    color: #ffffff;
}

.artwork-controls-cluster {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    z-index: 10;
    pointer-events: auto;
}

.control-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    padding: 0;
    opacity: 0.92;
    transition: opacity 0.15s ease;
}

.control-btn:hover {
    opacity: 1;
}

.control-btn svg {
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.9));
}

.control-btn.prev-btn,
.control-btn.next-btn {
    width: 32px;
    height: 32px;
}

.control-btn.prev-btn svg,
.control-btn.next-btn svg {
    width: 26px;
    height: 26px;
}

.control-btn.main-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(45, 45, 55, 0.78) 0%, rgba(15, 15, 20, 0.78) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.control-btn.main-play-btn:hover {
    background: radial-gradient(circle at 35% 35%, rgba(60, 60, 75, 0.88) 0%, rgba(20, 20, 28, 0.88) 100%);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

.control-btn.main-play-btn:active {
    transform: scale(0.96);
}

.play-icon-svg,
.pause-icon-svg {
    width: 30px;
    height: 30px;
    display: block;
}

.audio-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    transition: width 0.15s linear;
    z-index: 11;
}

.meta-header {
    text-align: center;
    margin-top: 18px;
    margin-bottom: 22px;
    width: 100%;
}

.track-title {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    line-height: 1.35;
    word-break: break-word;
}

.service-prompt {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.tracklist-drawer {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: none;
}

.tracklist-drawer.open {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracklist-header {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.15s ease;
}

.tracklist-item:last-child {
    border-bottom: none;
}

.tracklist-item:hover,
.tracklist-item.active {
    background: rgba(255, 255, 255, 0.12);
}

.track-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.track-item-num {
    color: #94a3b8;
    font-size: 11px;
    width: 16px;
}

.track-item-time {
    font-size: 11px;
    color: #94a3b8;
}

.platforms-card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
    text-decoration: none;
    min-height: 62px;
}

.service-row:last-child {
    border-bottom: none;
}

.service-row:hover {
    background-color: #f8fafc;
}

.service-brand {
    display: flex;
    align-items: center;
    max-width: 220px;
}

.service-official-logo {
    height: 25px;
    max-height: 28px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    display: block;
}

.service-fallback-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.service-fallback-icon svg {
    width: 100%;
    height: 100%;
}

.service-fallback-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.cta-button {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--btn-text);
    padding: 7px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.1px;
    min-width: 78px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.service-row:hover .cta-button {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-bg);
    color: var(--btn-hover-text);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.badge-presave {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.footer-wrap {
    margin-top: 26px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 360px;
}

.cookie-notice-text {
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.brand-tag {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.cookie-policy-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cookie-policy-btn:hover {
    color: #00f0ff;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.privacy-modal-box {
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
    width: 100%;
    max-width: 460px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
}

.modal-header-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.modal-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 18px;
}

.consent-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}

.consent-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.consent-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.consent-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #00a8ff;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.modal-save-btn {
    width: 100%;
    background: #0099ff;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    margin-top: 14px;
    transition: background-color 0.2s;
}

.modal-save-btn:hover {
    background: #0080d9;
}

#yt-player-container {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.toast-msg {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(18, 24, 38, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 9px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .main-stage {
        padding-top: 45px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .artwork-frame {
        width: 220px;
        height: 220px;
    }

    .track-title {
        font-size: 17px;
    }

    .service-row {
        padding: 12px 16px;
        min-height: 56px;
    }

    .service-official-logo {
        height: 22px;
        max-width: 120px;
    }

    .cta-button {
        padding: 6px 15px;
        font-size: 12.5px;
        min-width: 72px;
    }
}
