/* ==============================================
   CHLOROWAVE — style.css
   Font: Space Mono (logo/mono) + DM Sans (UI)
   Theme: Dark, hijau Spotify, clean
============================================== */

:root {
    --green:       #1DB954;
    --green-dim:   #1aa34a;
    --green-glow:  rgba(29, 185, 84, 0.15);
    --bg:          #0a0a0a;
    --surface:     #141414;
    --surface-2:   #1e1e1e;
    --surface-3:   #282828;
    --border:      rgba(255,255,255,0.08);
    --border-2:    rgba(255,255,255,0.14);
    --text:        #ffffff;
    --text-dim:    #a0a0a0;
    --text-muted:  #666666;
    --red:         #e04444;
    --amber:       #f5a623;
    --radius:      12px;
    --radius-sm:   8px;
    --radius-lg:   18px;
    --shadow:      0 8px 32px rgba(0,0,0,0.5);
    --mono:        'Space Mono', monospace;
    --sans:        'DM Sans', sans-serif;
}

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

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ==============================================
   SCREENS
============================================== */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==============================================
   SCREEN — LANDING
============================================== */
#screen-landing {
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.landing-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.orb-1 {
    width: 400px; height: 400px;
    background: var(--green);
    top: -100px; right: -100px;
    animation: drift 8s ease-in-out infinite alternate;
}

.orb-2 {
    width: 300px; height: 300px;
    background: #0066ff;
    bottom: -80px; left: -80px;
    animation: drift 10s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(30px, 20px); }
}

.landing-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    text-align: center;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 52px; height: 52px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-name {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 0.78rem;
    color: var(--green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 2px;
}

.hero-text h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
}

.hero-text p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.landing-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.feature-pill {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.83rem;
    color: var(--text-dim);
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

/* ==============================================
   BUTTONS
============================================== */
.btn-primary {
    background: var(--green);
    color: #000;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover { background: #1ed760; transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #444; color: #888; cursor: not-allowed; transform: none; }
.btn-primary.full-width { width: 100%; }

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    font-family: var(--sans);
    font-size: 0.9rem;
    border: 1px solid var(--border-2);
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.83rem;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--sans);
    padding: 4px;
}

.btn-link:hover { color: var(--text-dim); }

.btn-back {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.88rem;
    cursor: pointer;
    font-family: var(--sans);
    padding: 0;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.btn-back:hover { color: var(--text); }

.btn-loader { display: inline; }

/* ==============================================
   PAGE WRAP (Register, Pending)
============================================== */
.page-wrap {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.page-wrap.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding-top: 60px;
}

/* ==============================================
   SCREEN — REGISTER
============================================== */
.step-badge {
    display: inline-block;
    background: var(--green-glow);
    color: var(--green);
    border: 1px solid rgba(29,185,84,0.3);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.form-header h2 { font-size: 1.6rem; font-weight: 600; margin-bottom: 8px; }
.form-header p  { color: var(--text-dim); font-size: 0.9rem; }
.form-header    { margin-bottom: 28px; }

/* Payment Card */
.payment-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 28px;
}

.payment-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.payment-amount {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 12px;
}

.payment-methods {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.payment-badge {
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: var(--mono);
}

.payment-number {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.payment-number strong { color: var(--text); font-family: var(--mono); }

.payment-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Form Fields */
.reg-form { display: flex; flex-direction: column; gap: 20px; }

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

.field-group label {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-dim);
}

.field-group input,
.field-group textarea {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.93rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.field-group input:focus { border-color: var(--green); }
.field-group input::placeholder { color: var(--text-muted); }

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.email-input-wrap {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
}

.email-input-wrap:focus-within {
    border-color: var(--green);
}

.email-input-wrap input {
    flex: 1;
    background: transparent;
    border: none !important;
    border-radius: 0 !important;
    padding: 12px 4px 12px 16px;
    min-width: 0;
    outline: none;
}

.email-suffix {
    padding: 12px 14px 12px 4px;
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

.error-msg {
    background: rgba(224,68,68,0.1);
    border: 1px solid rgba(224,68,68,0.3);
    color: var(--red);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* ==============================================
   SCREEN — PENDING
============================================== */
.pending-icon {
    font-size: 3rem;
    animation: pulse 2s ease-in-out infinite;
}

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

#screen-pending h2 { font-size: 1.5rem; font-weight: 600; }
#screen-pending > p { color: var(--text-dim); }

.pending-info-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pending-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.pending-info-row span { color: var(--text-dim); }

.status-badge {
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(245,166,35,0.15);
    color: var(--amber);
    border: 1px solid rgba(245,166,35,0.3);
}

.status-badge.active {
    background: var(--green-glow);
    color: var(--green);
    border: 1px solid rgba(29,185,84,0.3);
}

.pending-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 340px;
    text-align: center;
}

/* ==============================================
   SCREEN — MAIN APP
============================================== */
#screen-app { background: var(--bg); }

#app {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 0 80px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* User profile */
#auth-section { position: relative; }

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    padding: 7px 14px;
    border-radius: 50px;
    border: 1px solid var(--border-2);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color 0.2s;
}

.user-info:hover { border-color: var(--green); }

.arrow-icon { font-size: 0.65rem; color: var(--text-muted); }

#user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 16px;
    width: 220px;
    z-index: 200;
    box-shadow: var(--shadow);
}

.menu-item label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-row { display: flex; gap: 6px; }

#edit-username-input {
    flex: 1;
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--sans);
    outline: none;
}

#edit-username-input:focus { border-color: var(--green); }

#user-menu button {
    background: var(--green);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: var(--sans);
}

#user-menu hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }

.logout-btn {
    width: 100%;
    background: transparent !important;
    color: var(--red) !important;
    border: 1px solid rgba(224,68,68,0.3) !important;
    padding: 8px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.85rem !important;
}

.logout-btn:hover { background: rgba(224,68,68,0.1) !important; }

/* Sections */
section {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

section h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-note {
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.78rem;
}

/* Player */
#player-section { background: var(--surface); }

#current-song {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.4em;
}

audio {
    width: 100%;
    height: 36px;
    accent-color: var(--green);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

.controls button {
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    padding: 10px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.controls button:hover {
    background: var(--surface-2);
    border-color: var(--green);
}

/* Request section */
.input-group { display: flex; gap: 8px; }

.input-group input {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus { border-color: var(--green); }
.input-group input::placeholder { color: var(--text-muted); }

.input-group button {
    background: var(--surface-3);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--sans);
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.input-group button:hover { background: var(--surface-2); border-color: var(--green); }

/* Playlist */
#playlist-ui {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#playlist-ui li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.88rem;
    color: var(--text-dim);
}

#playlist-ui li:hover { background: var(--surface-2); color: var(--text); }
#playlist-ui li.active { background: var(--surface-3); color: var(--green); }
#playlist-ui li.active .track-icon { color: var(--green); }

.track-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.track-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-loading,
.playlist-empty,
.playlist-error {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 16px 12px;
    cursor: default !important;
}

.playlist-error { color: var(--red); }

/* ==============================================
   MODAL
============================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 24px;
    backdrop-filter: blur(6px);
}

.modal-content {
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow);
}

.modal-icon { font-size: 2.5rem; margin-bottom: 16px; }
.modal-content h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.modal-content p  { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 24px; }

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==============================================
   RESPONSIVE
============================================== */
@media (max-width: 480px) {
    .hero-text h2 { font-size: 1.6rem; }
    .page-wrap { padding: 24px 16px 50px; }
    section { padding: 16px; }
    .modal-content { padding: 24px 20px; }
}

/* ==============================================
   SOUNDBAR ANIMATION
============================================== */
.soundbar {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    width: 14px;
}

.soundbar .bar {
    display: inline-block;
    width: 2.5px;
    background: var(--green);
    border-radius: 2px;
    animation: none;
    height: 4px;
}

#playlist-ui li.track-active .soundbar .bar { animation-play-state: running; }

.soundbar .b1 { animation: bounce 0.8s ease-in-out infinite;       animation-delay: 0s;    height: 8px; }
.soundbar .b2 { animation: bounce 0.8s ease-in-out infinite;       animation-delay: 0.15s; height: 12px; }
.soundbar .b3 { animation: bounce 0.8s ease-in-out infinite;       animation-delay: 0.3s;  height: 6px; }
.soundbar .b4 { animation: bounce 0.8s ease-in-out infinite;       animation-delay: 0.45s; height: 10px; }

@keyframes bounce {
    0%, 100% { transform: scaleY(0.3); }
    50%       { transform: scaleY(1); }
}

/* Track active state */
#playlist-ui li.track-active {
    background: var(--surface-3);
    color: var(--green);
}

/* Playlist header (nama subfolder) */
.playlist-header {
    padding: 14px 12px 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: default !important;
    border-bottom: 1px solid var(--border) !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.playlist-header:hover { background: transparent !important; }

.playlist-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ==============================================
   VISUALIZER CANVAS
============================================== */
#visualizer-canvas {
    width: 100%;
    height: 48px;
    display: block;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    background: transparent;
}

/* Username menu - tombol simpan di bawah */
.btn-save-username {
    width: 100%;
    margin-top: 8px;
    background: var(--green) !important;
    color: #000 !important;
    border: none !important;
    padding: 8px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
}

.btn-save-username:hover { background: #1ed760 !important; }

/* Edit username input full width */
#user-menu .menu-item input[type="text"] {
    width: 100%;
    margin-top: 6px;
}

/* Control buttons SVG */
.ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.ctrl-btn svg { display: block; }

/* Arrow icon fix */
.arrow-icon {
    width: 10px;
    height: 10px;
    color: var(--text-muted);
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ==============================================
   CUSTOM PLAYER CONTROLS
============================================== */
.progress-wrap {
    width: 100%;
    height: 4px;
    background: var(--surface-3);
    border-radius: 2px;
    cursor: pointer;
    margin: 10px 0 6px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--green);
    border-radius: 2px;
    transition: width 0.1s linear;
    pointer-events: none;
}

.progress-wrap:hover .progress-bar {
    background: #1ed760;
}

.time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-family: var(--mono);
}

.play-btn {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: var(--green) !important;
    color: #000 !important;
    border: none !important;
    padding: 0 !important;
}

.play-btn:hover {
    background: #1ed760 !important;
    transform: scale(1.05);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 4px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.15s;
}

.ctrl-btn:hover {
    color: var(--text);
    transform: scale(1.1);
}

/* ==============================================
   GUIDE MODAL
============================================== */
.modal-guide-content {
    max-width: 460px !important;
    text-align: left !important;
    padding: 28px !important;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.guide-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.guide-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.guide-close:hover { color: var(--text); }

.guide-intro {
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.guide-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-body strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 3px;
}

.step-body p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.step-body em {
    color: var(--text-dim);
    font-style: normal;
    font-weight: 500;
}

.guide-note {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--amber, #f5a623);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-note strong { color: var(--text-dim); }
.guide-note code {
    background: var(--surface-3, #282828);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--green);
}

/* Guide link di landing */
.guide-link {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin-top: -8px;
}

.guide-link:hover { color: var(--green) !important; }

/* Landing footer */
.landing-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.landing-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.landing-footer a:hover { color: var(--green); }

.landing-footer span { color: var(--surface-3, #282828); }

/* ==============================================
   COVER ART & PLAYER TOP
============================================== */
.player-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.player-cover {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    overflow: hidden;
    transition: background 0.3s;
}

.cover-initial {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.player-info { flex: 1; min-width: 0; }

.player-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Track thumbnail in playlist */
.track-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.track-thumb-initial {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.track-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Update playlist li to accommodate thumbnail */
#playlist-ui li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

/* Shuffle/Repeat active state */
.ctrl-active {
    color: var(--green) !important;
}

.ctrl-small {
    position: relative;
    opacity: 0.7;
}

.ctrl-small:hover { opacity: 1; }

/* ==============================================
   MINI PLAYER STICKY
============================================== */
.mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-2);
    z-index: 500;
    padding-bottom: env(safe-area-inset-bottom);
}

.mini-progress-wrap {
    width: 100%;
    height: 3px;
    background: var(--surface-3);
    cursor: pointer;
}

.mini-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--green);
    transition: width 0.1s linear;
    pointer-events: none;
}

.mini-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 500px;
    margin: 0 auto;
}

.mini-cover {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    overflow: hidden;
}

.mini-info {
    flex: 1;
    min-width: 0;
}

.mini-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.mini-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mini-ctrl { opacity: 0.8; }
.mini-ctrl:hover { opacity: 1; }

.mini-play-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: var(--green) !important;
    color: #000 !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Add bottom padding to app when mini player visible */
#app { padding-bottom: 100px; }

/* ==============================================
   FIXED CONTROL BUTTONS — uniform size
============================================== */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.15s;
    border-radius: 50%;
    flex-shrink: 0;
    padding: 0;
    position: relative;
}

.ctrl-btn:hover { color: var(--text); transform: scale(1.08); }

/* Side buttons (shuffle, prev, next, repeat) — same size box */
.ctrl-side {
    width: 44px;
    height: 44px;
}

/* Play button — larger circle */
.play-btn {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: var(--green) !important;
    color: #000 !important;
    border: none !important;
}

.play-btn:hover {
    background: #1ed760 !important;
    transform: scale(1.05) !important;
}

/* Active state for shuffle/repeat */
.ctrl-active { color: var(--green) !important; }

/* Repeat label (1 = repeat one) */
.repeat-label {
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
}

/* Mini player buttons uniform */
.mini-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mini-ctrl {
    width: 36px;
    height: 36px;
    opacity: 0.8;
    color: var(--text-dim);
}

.mini-ctrl:hover { opacity: 1; color: var(--text); }

.mini-play-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: var(--green) !important;
    color: #000 !important;
    border: none !important;
}

@media (max-width: 400px) {
    .ctrl-side { width: 40px; height: 40px; }
    .play-btn  { width: 52px !important; height: 52px !important; }
    .controls  { gap: 4px; }
}

/* ==============================================
   PLAYLIST SECTION HEADER + REFRESH BUTTON
============================================== */
.playlist-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.playlist-section-header h3 { margin-bottom: 0; }

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: var(--sans);
    padding: 5px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.btn-refresh:hover { color: var(--green); border-color: var(--green); }
.btn-refresh:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-refresh.refreshing svg {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ==============================================
   FONT AWESOME ICON ADJUSTMENTS
============================================== */
.logo-fa-icon {
    font-size: 1.8rem;
    color: var(--green);
}

.header-fa-icon {
    font-size: 1.2rem;
    color: var(--green);
}

.arrow-icon {
    font-size: 0.65rem;
    color: var(--text-muted);
    width: auto;
    height: auto;
    stroke: none;
    fill: none;
}

/* FA icons inside ctrl-btn */
.ctrl-btn i,
.ctrl-side i {
    font-size: 1.1rem;
    pointer-events: none;
}

.play-btn i { font-size: 1.15rem; }

.mini-play-btn i { font-size: 1rem; }

.mini-ctrl i { font-size: 1rem; }

/* Refresh button FA icon */
.btn-refresh i { font-size: 0.85rem; }
.btn-refresh.refreshing i { animation: spin 0.8s linear infinite; }

/* Repeat label position fix with FA */
#repeat-btn { position: relative; }

/* ==============================================
   FOLDER NOT FOUND — clean layout
============================================== */
.folder-not-found {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px !important;
    gap: 12px;
    cursor: default !important;
}

.folder-not-found:hover { background: transparent !important; }

.fnf-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.fnf-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.fnf-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.6;
}

.fnf-desc code {
    background: var(--surface-3);
    color: var(--green);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.82rem;
}

.fnf-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    margin-top: 8px;
    text-align: left;
}

.fnf-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.83rem;
    color: var(--text-dim);
}

.fnf-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fnf-step a { color: var(--green); text-decoration: none; }
.fnf-step a:hover { text-decoration: underline; }
.fnf-step code {
    background: var(--surface-3);
    color: var(--green);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.78rem;
}

/* ==============================================
   GUIDE MODAL — improved
============================================== */
.guide-warning-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(245,166,35,0.08);
    border: 1px solid rgba(245,166,35,0.25);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-warning-box > i {
    color: #f5a623;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.guide-warning-box strong { color: var(--text-dim); display: block; margin-bottom: 4px; }
.guide-warning-box p { margin: 0; }
.guide-warning-box em { color: var(--text-dim); font-style: normal; font-weight: 500; }
.guide-warning-box code {
    background: var(--surface-3);
    color: var(--green);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 0.78rem;
}

.step-img-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.guide-footer-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--green-glow);
    border: 1px solid rgba(29,185,84,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 16px;
}

.guide-footer-note > i { color: var(--green); }

/* Logo image */
.logo-img {
    height: 40px;
    width: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-img-sm {
    height: 26px;
    width: 26px;
    object-fit: contain;
    border-radius: 6px;
}
