/* ==========================================================================
   NRO DRAGON BALL GRAMOPHONE MUSIC PLAYER WIDGET
   Design: Classic Vinyl Turntable with 4-Star Dragon Ball Core & Metallic Tonearm
   ========================================================================== */

.nro-music-widget {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(16, 24, 39, 0.94), rgba(7, 12, 22, 0.96));
    border: 2px solid #ff7700;
    box-shadow: 0 4px 20px rgba(255, 119, 0, 0.45), 0 0 12px rgba(255, 170, 0, 0.3);
    border-radius: 50px;
    padding: 6px 14px 6px 6px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.nro-music-widget:hover {
    box-shadow: 0 6px 26px rgba(255, 119, 0, 0.65), 0 0 18px rgba(255, 187, 0, 0.5);
    border-color: #ffaa00;
    transform: translateY(-2px);
}

/* Turntable Stage (Stage for Disc + Needle) */
.nro-turntable {
    position: relative;
    width: 52px;
    height: 52px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Vinyl Disc */
.nro-vinyl-disc {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, #2d2d2d 0%, #151515 45%, #050505 75%, #1c1c1c 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 4px 10px rgba(0, 0, 0, 0.7);
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: nroDiscSpin 3.5s linear infinite;
    animation-play-state: paused;
    transition: box-shadow 0.3s ease;
}

/* Grooves Texture Rings */
.nro-vinyl-disc::before {
    content: '';
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.nro-vinyl-disc::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* When Music is Playing -> Spin Disc */
.nro-music-widget.playing .nro-vinyl-disc {
    animation-play-state: running;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15), 0 4px 12px rgba(255, 119, 0, 0.4);
}

/* 4-Star Dragon Ball Center Label */
.nro-dragonball-center {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff59d 0%, #ff9800 45%, #e65100 85%, #bf360c 100%);
    box-shadow: 0 0 6px rgba(255, 152, 0, 0.9), inset -2px -2px 4px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* 4 Crimson Stars */
.nro-db-stars {
    display: grid;
    grid-template-columns: repeat(2, 6px);
    grid-gap: 1.5px;
    align-items: center;
    justify-content: center;
}

.nro-star {
    color: #d50000;
    font-size: 5.5px;
    line-height: 1;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.7));
}

/* Metallic Tonearm (Needle Arm) */
.nro-tonearm {
    position: absolute;
    top: 0px;
    right: -1px;
    width: 28px;
    height: 36px;
    pointer-events: none;
    z-index: 5;
    transform-origin: 23px 5px;
    transform: rotate(-18deg);
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* When Music is Playing -> Needle Moves onto the Disc */
.nro-music-widget.playing .nro-tonearm {
    transform: rotate(24deg);
}

/* Tonearm SVG Elements */
.nro-tonearm-pivot {
    fill: #ffd54f;
    stroke: #ff8f00;
    stroke-width: 1.2;
}
.nro-tonearm-bar {
    stroke: #ffe082;
    stroke-width: 2.2;
    stroke-linecap: round;
}
.nro-tonearm-head {
    fill: #ff6f00;
    stroke: #ffca28;
    stroke-width: 0.9;
}

/* Track Information */
.nro-player-info {
    display: flex;
    flex-direction: column;
    margin: 0 12px 0 10px;
    max-width: 165px;
    min-width: 125px;
    cursor: pointer;
}

.nro-track-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffbb33;
    text-shadow: 0 0 8px rgba(255, 187, 51, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.nro-track-status {
    font-size: 10px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

/* Equalizer Animated Bars */
.nro-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
}

.nro-eq-bar {
    width: 2.5px;
    background: #64748b;
    border-radius: 1px;
    height: 3px;
    transition: height 0.2s;
}

.nro-music-widget.playing .nro-eq-bar:nth-child(1) { animation: nroEqBar 0.7s ease-in-out infinite alternate; }
.nro-music-widget.playing .nro-eq-bar:nth-child(2) { animation: nroEqBar 0.5s ease-in-out 0.2s infinite alternate; }
.nro-music-widget.playing .nro-eq-bar:nth-child(3) { animation: nroEqBar 0.8s ease-in-out 0.4s infinite alternate; }
.nro-music-widget.playing .nro-eq-bar:nth-child(4) { animation: nroEqBar 0.6s ease-in-out 0.1s infinite alternate; }

@keyframes nroEqBar {
    0% { height: 2px; background: #ff7700; }
    100% { height: 10px; background: #ffbb33; }
}

@keyframes nroDiscSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Controls Buttons */
.nro-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nro-btn {
    background: rgba(255, 119, 0, 0.16);
    border: 1px solid #ff7700;
    color: #ffbb33;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    outline: none !important;
}

.nro-btn:hover {
    background: #ff7700;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 119, 0, 0.8);
    transform: scale(1.12);
}

.nro-btn:active {
    transform: scale(0.92);
}

/* Responsive on Mobile Screens */
@media (max-width: 576px) {
    .nro-music-widget {
        top: 10px;
        right: 10px;
        padding: 4px 10px 4px 4px;
    }
    .nro-player-info {
        max-width: 110px;
        min-width: 85px;
        margin: 0 8px 0 6px;
    }
    .nro-track-title {
        font-size: 11px;
    }
    .nro-turntable {
        width: 44px;
        height: 44px;
    }
    .nro-vinyl-disc {
        width: 40px;
        height: 40px;
    }
    .nro-dragonball-center {
        width: 18px;
        height: 18px;
    }
    .nro-tonearm {
        width: 22px;
        height: 28px;
        transform-origin: 19px 4px;
    }
}

/* ==========================================================================
   NRO SEAMLESS NAVIGATION LOADER & CONTAINER TRANSITION
   Chống refresh toàn trang, giữ nhạc phát liên tục không bị ngắt quãng
   ========================================================================== */
#nro-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ff5500, #ffaa00, #ffea00);
    box-shadow: 0 0 10px rgba(255, 120, 0, 0.9), 0 0 5px rgba(255, 220, 0, 0.8);
    z-index: 999999;
    opacity: 0;
    transition: width 0.22s ease-out, opacity 0.15s ease;
    pointer-events: none;
}

#nro-page-loader.active {
    opacity: 1;
}

#container {
    transition: opacity 0.12s ease-in-out;
}

#container.nro-nav-loading {
    opacity: 0.5;
    pointer-events: none;
}
