/* ==========================================================================
   FUTURISTIC SPEEDOMETER HUD - IN-GAME TRANSPARENT HUD
   Optimized for GTA V / JGVRP / FiveM / SA-MP / CEF Webview
   With Out Law's Spotify Integration
   (Zero backdrop-filter to prevent CEF black box rendering bug)
   ========================================================================== */

:root {
    /* Palette sampled directly from reference */
    --color-text-main: #3b394f;
    --color-text-subtle: #7d758d;
    --color-text-dim: #9da4b6;
    --color-teal: #50c8c8;
    --color-teal-dim: #4fb2b2;
    --color-pink-magenta: #e026b4;
    --color-pink-light: #f7c2dc;
    --color-purple-blue: #6977ef;
    --color-lavender: #cfc8ea;
    --color-guide-line: #cfcbd6;
    --color-warning-red: #a83535;

    /* Spotify Cyberpunk Palette */
    --spotify-green: #1ed760;
    --spotify-green-glow: rgba(30, 215, 96, 0.45);
    --purple-deep: #1b0933;
    --purple-mid: #381254;
    --purple-neon: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.5);
    --pink-neon: #ec4899;

    /* Typography */
    --font-numeric: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ui: 'Rajdhani', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-brand: 'Orbitron', -apple-system, sans-serif;
}

/* Reset & 100% Transparent In-Game Environment */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent !important;
    background-color: transparent !important;
    user-select: none;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: var(--font-ui);
}

/* In-Game HUD Stage (Positioned in Bottom-Right Corner) */
.hud-stage {
    position: fixed;
    right: 32px;
    bottom: 24px;
    width: clamp(380px, 28vw, 540px);
    aspect-ratio: 444 / 250;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    pointer-events: none;
    z-index: 9999;
}

/* Scalable Master SVG with Ambient Drop Shadow for Contrast against Game World */
#hud-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

/* ==========================================================================
   SVG HUD GRAPHICS STYLING
   ========================================================================== */

.txt-subtle {
    font-family: var(--font-ui);
    font-weight: 500;
}

.rpm-seg {
    transition: opacity 0.12s ease, fill 0.15s ease;
}

.rpm-seg.inactive {
    opacity: 0.14 !important;
    filter: none !important;
}

.rpm-seg.active {
    opacity: 1 !important;
}

#speed-value, #speed-stroke, #speed-glow, #speed-core {
    font-family: var(--font-numeric);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.hud-icon {
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.hud-icon:not(.active):not(.warning) {
    opacity: 0.45;
}

.hud-icon.active {
    opacity: 1;
}

.hud-icon.warning {
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(168, 53, 53, 0.6));
}

/* ==========================================================================
   SEATBELT INDICATOR SPECIFIC STYLES & ALARM ANIMATION
   ========================================================================== */
#icon-seatbelt {
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

#icon-seatbelt circle,
#icon-seatbelt path,
#icon-seatbelt line {
    transition: stroke 0.25s ease, filter 0.25s ease;
}

/* Buckled / Seatbelt ON: Clean steady teal glow */
#icon-seatbelt.active {
    opacity: 1 !important;
}

#icon-seatbelt.active circle,
#icon-seatbelt.active path,
#icon-seatbelt.active line {
    stroke: #50c8c8 !important;
    filter: drop-shadow(0 0 3px rgba(80, 200, 200, 0.85));
}

/* UNBUCKLED / Seatbelt OFF Warning: Urgent pulsating neon red alarm */
#icon-seatbelt.seatbelt-warning {
    opacity: 1 !important;
    animation: seatbeltAlarmPulse 0.45s ease-in-out infinite alternate !important;
}

#icon-seatbelt.seatbelt-warning circle,
#icon-seatbelt.seatbelt-warning path,
#icon-seatbelt.seatbelt-warning line {
    stroke: #ff2255 !important;
    filter: drop-shadow(0 0 5px rgba(255, 34, 85, 0.95)) !important;
}

@keyframes seatbeltAlarmPulse {
    0% {
        opacity: 0.35;
        filter: drop-shadow(0 0 2px rgba(255, 34, 85, 0.4));
    }
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(255, 34, 85, 1));
    }
}

#battery-icon-visual rect {
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   SPOTIFY TOGGLE BUTTON (THE DRIPPING PURPLE EYE)
   Positioned beside the speedometer gauge exactly as mapped
   ========================================================================== */

.spotify-toggle-btn {
    position: absolute;
    right: -10px;
    top: 27%;
    width: clamp(40px, 3.4vw, 54px);
    height: clamp(40px, 3.4vw, 54px);
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    pointer-events: auto !important;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spotify-toggle-btn .eye-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.spotify-toggle-btn:hover {
    transform: scale(1.15) rotate(2deg);
}

.spotify-toggle-btn:active {
    transform: scale(0.95);
}

/* Pulse animation on eye button */
.eye-pulse-ring {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(168, 85, 247, 0.6);
    pointer-events: none;
    opacity: 0;
    animation: eyePulse 3s infinite;
}

@keyframes eyePulse {
    0% { transform: scale(0.7); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ==========================================================================
   SPOTIFY POPUP WIDGET (OUT LAW'S HUD CARD)
   ========================================================================== */

.spotify-widget {
    position: absolute;
    bottom: calc(100% - 20px);
    right: 0px;
    width: clamp(310px, 22vw, 390px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px) scale(0.94);
    transform-origin: bottom right;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotify-widget.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto !important;
}

/* 1. Top Search Bar Pill */
.spotify-search-container {
    position: relative;
    width: 100%;
    margin-bottom: 6px;
    background: transparent !important;
    z-index: 30;
}

.spotify-search-bar {
    width: 100%;
    height: 38px;
    background: #180938; /* Solid dark purple, no backdrop-filter to prevent CEF black box */
    border: 1.5px solid rgba(168, 85, 247, 0.6);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spotify-search-bar:focus-within {
    border-color: #c084fc;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.8), 0 0 14px rgba(192, 132, 252, 0.5);
}

.spotify-search-bar .search-icon {
    width: 16px;
    height: 16px;
    color: #c084fc;
    flex-shrink: 0;
}

.spotify-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.spotify-search-bar input::placeholder {
    color: rgba(207, 180, 245, 0.7);
    font-size: 12.5px;
}

.search-clear-btn,
.popup-close-btn {
    background: transparent;
    border: none;
    color: #e9d5ff;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close-btn:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.45);
    transform: rotate(90deg);
}

.search-clear-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.spotify-search-bar svg {
    width: 14px;
    height: 14px;
}

/* Search Results Dropdown */
.spotify-search-results {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    background: #170a33; /* Solid background for CEF compatibility */
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    padding: 6px;
}

.spotify-search-results::-webkit-scrollbar {
    width: 4px;
}
.spotify-search-results::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.6);
    border-radius: 4px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s ease;
}

.search-item:hover {
    background: rgba(168, 85, 247, 0.35);
}

.search-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-track-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-track-artist {
    font-size: 11px;
    color: #cfb4f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-duration {
    font-size: 11px;
    color: #9d8ab8;
    font-variant-numeric: tabular-nums;
}

.search-empty {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: #cfb4f5;
}

/* 2. Character Backdrop & OUT LAW'S Logo (Prominently Visible) */
.spotify-art-backdrop {
    position: relative;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: transparent !important;
    pointer-events: none;
    margin-bottom: -50px; /* Gentle overlap so her head, face & logo are fully visible */
    z-index: 10;
}

.spotify-character-img {
    height: 290px;
    width: auto;
    object-fit: contain;
    background: transparent !important;
    pointer-events: none;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.75));
    transition: transform 0.25s ease;
}

.spotify-outlaws-logo {
    position: absolute;
    left: 12px;
    top: 26px;
    width: 88px;
    height: auto;
    object-fit: contain;
    transform: rotate(-12deg);
    background: transparent !important;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.85));
    z-index: 15;
    transition: transform 0.25s ease;
}

/* 3. Foreground Dripping Music Player Card (Compact & Resizable) */
.spotify-player-card {
    position: relative;
    width: 172px; /* Compact width so anime character hands & body are clearly exposed */
    background: linear-gradient(180deg, #3d145c 0%, #25093b 55%, #3d1259 100%);
    border: 1.5px solid rgba(192, 132, 252, 0.45);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    padding: 8px 10px 4px 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85), 
                inset 0 1px 1px rgba(255, 255, 255, 0.25);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform-origin: top center;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), margin-bottom 0.2s ease;
}

/* Card Header */
.player-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    gap: 4px;
}

.player-source-tag {
    color: #e9d5ff;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-size: 8.5px;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.player-size-btn,
.player-settings-btn {
    background: transparent;
    border: none;
    color: #c084fc;
    height: 19px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.player-size-btn {
    background: rgba(168, 85, 247, 0.22);
    border: 1px solid rgba(192, 132, 252, 0.35);
    padding: 0 5px;
    gap: 3px;
    color: #f5d0fe;
}

.player-size-btn:hover {
    background: rgba(168, 85, 247, 0.45);
    color: #ffffff;
    transform: scale(1.08);
}

.player-size-btn svg {
    width: 10px;
    height: 10px;
}

.size-indicator {
    font-size: 8.5px;
    font-weight: 700;
    font-family: var(--font-numeric);
    color: #f0abfc;
}

.player-settings-btn {
    width: 19px;
    border-radius: 50%;
}

.player-settings-btn:hover {
    color: #ffffff;
    background: rgba(192, 132, 252, 0.25);
    transform: rotate(45deg);
}

.player-settings-btn svg {
    width: 13px;
    height: 13px;
}

/* Size Toast Floating Pill */
.size-toast-pill {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    background: #25093b;
    border: 1px solid #c084fc;
    border-radius: 9999px;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 600;
    padding: 2px 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    opacity: 0;
    z-index: 60;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.size-toast-pill.show {
    opacity: 1;
}

/* Upper Screen: Album Cover with Visualizer */
.player-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #140726;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(192, 132, 252, 0.25);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.player-album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.player-screen:hover .player-album-cover {
    transform: scale(1.04);
}

/* Bouncing Equalizer Bars */
.sound-visualizer {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 5px;
    border-radius: 6px;
}

.sound-visualizer .bar {
    width: 3px;
    height: 4px;
    background: #1ed760;
    border-radius: 1.5px;
    transition: height 0.15s ease;
}

.sound-visualizer.active .bar-1 { animation: eqBounce 0.7s infinite alternate ease-in-out; }
.sound-visualizer.active .bar-2 { animation: eqBounce 0.5s infinite alternate ease-in-out 0.15s; }
.sound-visualizer.active .bar-3 { animation: eqBounce 0.8s infinite alternate ease-in-out 0.3s; }
.sound-visualizer.active .bar-4 { animation: eqBounce 0.6s infinite alternate ease-in-out 0.1s; }

@keyframes eqBounce {
    0% { height: 3px; background: #a855f7; }
    50% { height: 14px; background: #ec4899; }
    100% { height: 10px; background: #1ed760; }
}

/* Track Metadata */
.player-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-title-wrapper {
    overflow: hidden;
    white-space: nowrap;
}

.track-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 10px;
    font-weight: 500;
    color: #cfb4f5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Progress Bar & Timestamps */
.player-progress-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 4.5px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899 0%, #c084fc 100%);
    box-shadow: 0 0 6px #c084fc;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.progress-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 600;
    color: #bfa5e0;
    font-variant-numeric: tabular-nums;
}

/* Control Buttons Row */
.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px 2px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: #e9d5ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ctrl-btn:hover {
    color: #ffffff;
    transform: scale(1.15);
}

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

.ctrl-btn svg {
    width: 14px;
    height: 14px;
}

.ctrl-btn.sub-btn {
    color: #a78bcf;
}
.ctrl-btn.sub-btn.active {
    color: #1ed760;
}
.ctrl-btn.sub-btn svg {
    width: 11px;
    height: 11px;
}

.play-main-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    border-radius: 50%;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.play-main-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.7);
}

.play-main-btn svg {
    width: 15px;
    height: 15px;
    margin-left: 2px;
}
.play-main-btn #spotify-icon-pause {
    margin-left: 0;
}

/* Volume Bar */
.player-volume-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 1px 2px 1px;
}

.vol-icon {
    width: 11px;
    height: 11px;
    color: #bfa5e0;
    flex-shrink: 0;
}

.volume-slider-wrapper {
    position: relative;
    flex: 1;
    height: 3.5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    display: flex;
    align-items: center;
}

.volume-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
    margin: 0;
}

.volume-slider-fill {
    height: 100%;
    background: linear-gradient(90deg, #c084fc 0%, #e879f9 100%);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(192, 132, 252, 0.6);
}

/* Dripping Slime SVG Bottom */
.player-drip-container {
    position: absolute;
    top: 100%;
    left: -1.5px;
    right: -1.5px;
    height: 34px;
    pointer-events: none;
    z-index: 15;
}

.player-drip-svg {
    width: calc(100% + 3px);
    height: 100%;
    display: block;
}

/* Status Pill */
.spotify-status-pill {
    margin-top: 30px;
    font-size: 9.5px;
    font-weight: 600;
    background: #14082a;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 9999px;
    padding: 2.5px 8px;
    color: #e9d5ff;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.demo {
    background: #f59e0b;
}

.status-dot.online {
    background: #ff0033;
    box-shadow: 0 0 6px rgba(255, 0, 51, 0.8);
}

.status-dot.playing {
    background: #06b6d4;
    box-shadow: 0 0 8px #06b6d4;
    animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.25); }
}

.badge-yt {
    background: #ff0033;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
    letter-spacing: 0.5px;
    box-shadow: 0 0 6px rgba(255, 0, 51, 0.4);
}

/* ==========================================================================
   SPOTIFY DEVELOPER SETUP & SETTINGS MODAL
   ========================================================================== */

.spotify-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 4, 25, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    pointer-events: auto !important;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.spotify-modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.spotify-modal-box {
    width: 100%;
    max-width: 500px;
    background: #16082e;
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    border-radius: 20px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    color: #ffffff;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { transform: scale(0.92) translateY(12px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
    background: #200b3d;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spotify-logo-svg {
    width: 24px;
    height: 24px;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #c084fc;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #e2d9f3;
}

.guide-card h4 {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 8px;
}

.guide-steps {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-steps a {
    color: #1ed760;
    text-decoration: underline;
}

.uri-copy-container {
    margin: 6px 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.55);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.uri-copy-container code {
    font-family: monospace;
    font-size: 12px;
    color: #4ade80;
    flex: 1;
    word-break: break-all;
}

.btn-copy {
    background: rgba(168, 85, 247, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-copy:hover {
    background: rgba(168, 85, 247, 0.5);
}

.uri-hint {
    font-size: 11.5px;
    color: #facc15;
    display: block;
    margin-top: 2px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #cfb4f5;
}

.input-group input {
    background: rgba(0, 0, 0, 0.55);
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 13.5px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus {
    border-color: #1ed760;
    box-shadow: 0 0 12px rgba(30, 215, 96, 0.4);
}

.auth-status-msg {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    font-size: 12.5px;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-connect {
    flex: 2;
    background: #1ed760;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    color: #000000;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(30, 215, 96, 0.4);
}

.btn-connect:hover {
    background: #22e668;
    transform: translateY(-1px);
}

.btn-disconnect {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 11px 14px;
    color: #cfb4f5;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-disconnect:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   CUSTOM SIZE / SCALE CONTROL IN SETTINGS
   ========================================================================== */

.scale-control-box {
    background: rgba(168, 85, 247, 0.08);
    border: 1.5px solid rgba(168, 85, 247, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scale-control-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.scale-control-header label {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.scale-badge-icon {
    font-size: 14px;
}

.scale-val-badge {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    font-family: var(--font-numeric);
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.5);
}

.scale-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scale-bound-text {
    font-size: 11px;
    color: #a78bcf;
    white-space: nowrap;
}

.scale-range-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.scale-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ec4899;
    box-shadow: 0 0 8px #ec4899, inset 0 1px 1px #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.scale-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.scale-preset-buttons {
    display: flex;
    gap: 6px;
}

.btn-scale-preset {
    flex: 1;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #cfb4f5;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-scale-preset:hover {
    background: rgba(168, 85, 247, 0.3);
    color: #ffffff;
    border-color: #c084fc;
}

.btn-scale-preset.active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);
    border-color: #ec4899;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.35);
}

.scale-tip {
    font-size: 11px;
    color: #cfb4f5;
    margin: 0;
    line-height: 1.4;
}

/* Hide legacy token banner */
#spotify-token-banner {
    display: none !important;
}


