:root {
    --bg-dark: #000000; /* Pitch black */
    --glass-bg: rgba(10, 8, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --accent: #9d4edd;
    --accent-hover: #c77dff;
    --text-main: #ffffff;
    --text-muted: #8b85a6;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
}

/* Animated Fluid Background (Darker) */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #000000;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #240046 0%, transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #10002b 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #3c096c 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* App Layout - 3 Panel (Sidebar, Stage, Chat) */
#app {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    grid-template-rows: 1fr 100px;
    height: 100vh;
    padding: 16px;
    gap: 16px;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Sidebar */
.sidebar {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.45);
}
.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(157, 78, 221, 0.15), transparent);
    border-left: 3px solid var(--accent);
}

.nav-link.locked-tab {
    opacity: 0.35;
    cursor: pointer;
}

.nav-link.locked-tab:hover {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.05);
}

.user-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(0,0,0,0.3);
    padding: 8px 16px;
    border-radius: 500px;
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%;
    box-sizing: border-box;
}

.user-mini img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-mini span {
    font-weight: 700;
    font-size: 0.9rem;
    padding-right: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Main Content (Stage) */
.main-content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.view-section {
    min-height: 100%;
}
#view-home:not(.hidden), #view-radio:not(.hidden) {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.view-section.hidden {
    display: none !important;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(157, 78, 221, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Radio Stage UI */
.radio-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.stage-cover-container {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    margin-bottom: 32px;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    position: relative;
    background: #0a0a0a;
}

.stage-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    transition: opacity 0.4s ease;
}

.stage-cover.hidden {
    opacity: 0.1;
}

.visualizer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding: 0 30px;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.visualizer.hidden {
    opacity: 0;
}

.vis-bar {
    width: 12px;
    background: linear-gradient(to top, var(--accent), #ff006e);
    border-radius: 4px;
    min-height: 10px;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.6);
    transition: height 0.08s ease;
}

.radio-stage h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-stage p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.stage-actions {
    display: flex;
    gap: 20px;
}

.like-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px 24px;
    border-radius: 500px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.2s;
}

.like-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.like-btn.liked {
    background: rgba(255, 0, 110, 0.1);
    border-color: #ff006e;
    color: #ff006e;
}

.like-btn.liked svg {
    fill: #ff006e;
}

/* Right Panel (Chat) */
.chat-panel {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #39ff14;
    border-radius: 50%;
    box-shadow: 0 0 10px #39ff14;
    animation: pulse 1.5s infinite;
}

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

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.chat-placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 20px;
}

.chat-msg {
    display: flex;
    gap: 12px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-content {
    flex: 1;
}

.chat-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.chat-user {
    font-weight: 700;
    font-size: 0.9rem;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-text {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px 16px;
    border-radius: 500px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.chat-input-area input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-area button {
    background: var(--accent);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-input-area button:disabled {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
    cursor: not-allowed;
}

.chat-input-area button:not(:disabled):hover {
    transform: scale(1.05);
}

/* Floating Player */
.floating-player {
    grid-column: 1 / -1;
    grid-row: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.player-left {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 30%;
}

.mini-cover-container {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.player-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.65);
}

.player-meta h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.player-meta p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 8px;
}

.player-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.player-btn:hover {
    color: white;
}

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

.play-circle {
    width: 40px;
    height: 40px;
    background: white;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}
.play-circle:hover { transform: scale(1.05); color: black; }

.scrubber {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.scrubber span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.time-slider { accent-color: var(--accent); cursor: pointer; }
.vol-slider { width: 100px; accent-color: var(--accent); cursor: pointer; }

.player-right {
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Profile View */
.profile-banner {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #240046, #020105);
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 16px 16px 0 0;
}

.edit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 500px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: bold;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.profile-header {
    display: flex;
    align-items: flex-end;
    padding: 0 40px;
    margin-top: 20px;
    margin-bottom: 40px;
    gap: 24px;
    position: relative;
    z-index: 10;
}

.profile-avatar-container {
    position: relative;
    margin-top: -75px;
}
.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
    object-fit: cover;
    background: #1a1a1a;
}
.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: 2px solid var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-info h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
}

.profile-info p {
    color: var(--accent-hover);
    font-weight: bold;
}

.profile-socials {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: flex-end;
    margin-bottom: 8px;
    position: relative;
    z-index: 20;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-link:hover {
    color: white;
    transform: translateY(-3px);
}

.social-link[title="Website"]:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.social-link[title="YouTube"]:hover {
    background: rgba(255, 0, 60, 0.1);
    border-color: rgba(255, 0, 60, 0.3);
    color: #ff003c;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.4);
}

.social-link[title="Spotify"]:hover {
    background: rgba(29, 185, 84, 0.1);
    border-color: rgba(29, 185, 84, 0.3);
    color: #1db954;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.4);
}

.profile-content { padding: 0 40px 40px 40px; }
.content-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
}

.track-list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.02);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.list-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}
.list-item img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}
.list-item-info { flex: 1; }
.list-item-title { font-weight: 700; font-size: 0.95rem; }
.list-item-artist { color: var(--text-muted); font-size: 0.85rem; }

/* Buttons & Modals */
.btn-glow {
    background: linear-gradient(135deg, var(--accent), #ff006e);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 500px;
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 78, 221, 0.5);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-backdrop.hidden { display: none; }
.glass-modal {
    background: rgba(10, 8, 20, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.glass-modal h2 { font-family: var(--font-heading); margin-bottom: 8px; }
.glass-modal p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.auth-buttons { display: flex; flex-direction: column; gap: 12px; }
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-btn:hover { background: rgba(255,255,255,0.1); }
.input-group { margin-bottom: 16px; }
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-muted);
}
.input-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
    color: white;
    font-family: var(--font-body);
}
.input-group input[type="file"] {
    width: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Sidebar Search */
.sidebar-search-container {
    padding: 0 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.sidebar-search-container input {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px 14px;
    border-radius: 8px 0 0 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.sidebar-search-container input:focus {
    border-color: var(--accent);
}

.sidebar-search-container button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 14px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sidebar-search-container button:hover {
    background: var(--accent-hover);
}

.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.artist-card {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.artist-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: rgba(157, 78, 221, 0.1);
}

.artist-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.artist-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.artist-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}
/* Update .hidden class to safely hide views without destroying iframe */
.view-section.hidden {
    display: none;
}
#view-radio.hidden {
    display: block !important;
    position: absolute;
    top: -9999px;
    left: -9999px;
    visibility: hidden;
    pointer-events: none;
}
/* Discovery (Tinder-style) UI */
.discovery-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.discovery-card {
    width: 340px;
    height: 340px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    position: relative;
    transition: transform 0.4s ease, opacity 0.4s ease;
    cursor: pointer;
}

.discovery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.35);
}

/* Swipe Animations */
.swipe-anim-left {
    transform: translateX(-200px) rotate(-15deg);
    opacity: 0;
}

.swipe-anim-right {
    transform: translateX(200px) rotate(15deg);
    opacity: 0;
}

.swipe-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.swipe-btn.swipe-left:hover {
    background: rgba(255,0,110,0.2);
    color: #ff006e;
    border-color: #ff006e;
    transform: scale(1.1);
}

.swipe-btn.swipe-right:hover {
    background: rgba(52,168,83,0.2);
    color: #34A853;
    border-color: #34A853;
    transform: scale(1.1);
}

.swipe-btn.swipe-right.liked {
    background: rgba(52,168,83,0.2) !important;
    color: #34A853 !important;
    border-color: #34A853 !important;
}

/* Global Search Bar (Restored) */
.global-search-container {
    padding: 20px 40px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.global-search-container input {
    width: 100%;
    max-width: 500px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 14px 20px;
    border-radius: 500px 0 0 500px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.global-search-container input:focus {
    border-color: var(--accent);
}

.global-search-container button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 0 500px 500px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.global-search-container button:hover {
    background: var(--accent-hover);
}

#track-comments-list {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
#track-comments-list::-webkit-scrollbar {
    display: none;             /* Chrome, Safari and Opera */
}

.glass-modal {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}
.glass-modal::-webkit-scrollbar {
    display: none;             /* Chrome, Safari and Opera */
}

/* Enforce absolute sizing, position, and opacity for the live radio YouTube stage */
#youtube-player {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 1 !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

/* ============================================================================
   MOBILE RESPONSIVENESS AND DRAWERS OVERRIDES
   ============================================================================ */

/* Main style definitions for bubble buttons and backdrop */
.mobile-bubble-btn {
    display: none;
    position: fixed;
    top: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 8, 20, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1010;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-bubble-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.mobile-bubble-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}
.mobile-bubble-btn:active {
    transform: scale(0.95);
}
#mobile-nav-toggle {
    left: 16px;
}
#mobile-chat-toggle {
    right: 16px;
}

/* Smoothly hide bubble buttons when respective drawer is open */
body.nav-open #mobile-nav-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateX(-50px);
}
body.chat-open #mobile-chat-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8) translateX(50px);
}

.mobile-drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .mobile-bubble-btn {
        display: flex;
    }
    .mobile-drawer-backdrop {
        display: block;
    }

    #app {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr auto !important;
        padding: 0 !important;
        gap: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden;
    }

    /* Keep middle content centered and full width */
    .main-content {
        grid-column: 1 !important;
        grid-row: 1 !important;
        border-radius: 0 !important;
        border: none !important;
        padding: 76px 16px 24px 16px !important;
        height: 100%;
        width: 100%;
        overflow-y: auto;
    }

    /* Transform Sidebar to Slide-in Drawer & respect dynamic viewport and safe-area padding */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1000 !important;
        border-radius: 0 20px 20px 0 !important;
        border-left: none !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.9) !important;
        padding-bottom: max(48px, calc(24px + env(safe-area-inset-bottom))) !important;
    }
    .sidebar.open {
        transform: translateX(0) !important;
    }

    /* Transform Chat Panel to Slide-in Drawer with dynamic heights */
    .chat-panel {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 320px !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1000 !important;
        border-radius: 20px 0 0 20px !important;
        border-right: none !important;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.9) !important;
    }
    .chat-panel.open {
        transform: translateX(0) !important;
    }
    .chat-input-area {
        padding-bottom: max(36px, calc(16px + env(safe-area-inset-bottom))) !important;
    }

    /* Premium Bottom Player layout on Mobile (volume completely hidden) */
    .floating-player {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "scrubber scrubber"
            "meta controls" !important;
        gap: 10px !important;
        height: auto !important;
        min-height: 110px !important;
        padding: 12px 16px max(36px, calc(16px + env(safe-area-inset-bottom))) 16px !important;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
        border-left: none !important;
        border-right: none !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.6) !important;
        box-sizing: border-box !important;
    }

    .player-left {
        grid-area: meta !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .mini-cover-container {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
    }

    .player-meta h3 {
        font-size: 0.9rem !important;
        max-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .player-meta p {
        font-size: 0.75rem !important;
        max-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .player-center {
        display: contents !important;
    }

    .player-controls {
        grid-area: controls !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 12px !important;
        margin-bottom: 0 !important;
    }

    .player-controls svg {
        width: 16px !important;
        height: 16px !important;
    }

    .play-circle {
        width: 34px !important;
        height: 34px !important;
    }

    /* Hide Volume slider on Mobile as requested */
    .player-right {
        display: none !important;
    }

    /* Scrubber layout styling - placed at the bottom */
    .scrubber {
        grid-area: scrubber !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .time-slider {
        flex: 1 !important;
    }

    /* Global Search Bar polish */
    .global-search-container {
        padding: 12px 16px !important;
        margin-top: 10px !important;
    }
    .global-search-container input {
        font-size: 0.9rem !important;
        padding: 10px 16px !important;
    }
    .global-search-container button {
        padding: 0 16px !important;
    }

    /* Home / Discovery Tinder Swipe UI polish */
    .discovery-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "card card"
            "leftbtn rightbtn" !important;
        gap: 20px !important;
        justify-items: center !important;
        margin-bottom: 12px !important;
    }
    .discovery-card {
        grid-area: card !important;
        width: 250px !important;
        height: 250px !important;
        border-radius: 16px !important;
    }
    #btn-discover-dislike {
        grid-area: leftbtn !important;
        justify-self: right !important;
    }
    #btn-discover-like {
        grid-area: rightbtn !important;
        justify-self: left !important;
    }
    .swipe-btn {
        width: 52px !important;
        height: 52px !important;
    }
    .swipe-btn svg {
        width: 24px !important;
        height: 24px !important;
    }
    #discover-title {
        font-size: 1.4rem !important;
        max-width: 100% !important;
    }
    #discover-artist {
        font-size: 1rem !important;
    }

    /* Radio / Stage View polish */
    .radio-stage {
        padding: 20px 16px !important;
    }
    .stage-cover-container {
        max-width: 100% !important;
        margin-bottom: 20px !important;
        border-radius: 16px !important;
    }
    .radio-stage h1 {
        font-size: 1.8rem !important;
        max-width: 100% !important;
        white-space: normal !important;
    }
    .radio-stage p {
        font-size: 1rem !important;
        margin-bottom: 16px !important;
    }

    /* Search results grids */
    .artist-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-top: 12px !important;
    }
    .artist-card {
        padding: 16px !important;
        border-radius: 12px !important;
    }
    .artist-card img {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 8px !important;
    }
    .artist-card h3 {
        font-size: 0.95rem !important;
    }

    /* Profile tab responsive adjustments */
    .profile-banner {
        height: 120px !important;
        border-radius: 0 !important;
    }
    .profile-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 0 16px !important;
        margin-top: 16px !important;
        margin-bottom: 24px !important;
        gap: 12px !important;
    }
    .profile-avatar-container {
        margin-top: -55px !important;
    }
    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
        border-width: 3px !important;
    }
    .profile-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .profile-info h1 {
        font-size: 1.8rem !important;
        text-align: center !important;
    }
    .profile-socials {
        margin-left: 0 !important;
        align-self: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
    .profile-content {
        padding: 0 16px 24px 16px !important;
    }

    /* Modals fit */
    .glass-modal {
        padding: 24px 16px !important;
        max-width: calc(100% - 24px) !important;
        margin: 12px !important;
    }
}
