:root {
    --primary: #7289da;
    --primary-glow: rgba(114, 137, 218, 0.5);
    --bg-dark: #0c0c0e;
    --sidebar-bg: rgba(20, 20, 25, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a0a0a8;
    --accent: #00d2ff;
    --success: #43b581;
    --danger: #f04747;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(114, 137, 218, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Stars Canvas */
#dashboard-stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.glass-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    backdrop-filter: blur(10px);
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    transition: 0.3s ease;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 50px;
    color: var(--text-main);
}

.sidebar-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}

.nav-links li i {
    font-size: 18px;
}

.nav-links li:hover, .nav-links li.active {
    background: var(--glass-bg);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-links li.active {
    border-left: 3px solid var(--primary);
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 28px;
    font-weight: 600;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    font-size: 14px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online { background: var(--success); box-shadow: 0 0 10px var(--success); }

/* Tab Panes */
.content-scroll-area {
    padding: 0 40px 40px;
    overflow-y: auto;
    flex-grow: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    transition: 0.3s;
}

.stat-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-val {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Music Layout — flex so panels are resizable via drag handles */
.music-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - 160px);
    overflow: hidden;
}

/* Drag handle between panels */
.panel-resizer {
    width: 8px;
    flex-shrink: 0;
    cursor: col-resize;
    background: transparent;
    position: relative;
    transition: background 0.2s;
    z-index: 5;
}

.panel-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: var(--glass-border);
    border-radius: 2px;
    transition: 0.2s;
}

.panel-resizer:hover::after,
.panel-resizer.dragging::after {
    background: var(--primary);
    height: 60px;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Each panel gets a flex basis and can be resized */
#panelPlayer {
    flex: 0 0 auto;
    width: 35%;
    min-width: 280px;
    max-width: 60%;
    margin-right: 0;
    border-radius: 20px;
    margin: 0 4px 0 0;
}

#panelLyrics {
    flex: 1 1 auto;
    min-width: 200px;
    margin: 0 4px;
    overflow: hidden;
}

#panelQueue {
    flex: 0 0 auto;
    width: 280px;
    min-width: 200px;
    max-width: 45%;
    margin: 0 0 0 4px;
    overflow: hidden;
}

.player-main {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* Music Search */
.music-search-container {
    position: relative;
    margin: 15px 0 30px 0;
    z-index: 10;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 15px;
    transition: 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.search-box i {
    color: var(--text-muted);
    margin-right: 12px;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    width: 100%;
    outline: none;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #18181b;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.search-results-dropdown.hidden {
    display: none;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(114, 137, 218, 0.15);
}

.search-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.search-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.search-item-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-author {
    font-size: 12px;
    color: var(--text-muted);
}

.search-item-dur {
    font-size: 12px;
    color: var(--text-muted);
}

/* Now Playing */
.now-playing {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: auto;
    padding-bottom: 20px;
}

.album-art {
    width: 150px;
    height: 150px;
    background: rgba(0,0,0,0.5);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    transition: 0.5s ease-in-out;
}

.fa-spin-slow {
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.track-details h2 {
    font-size: 26px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.track-details p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Controls */
.player-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
}

.seek-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-family: monospace;
    color: var(--text-muted);
}

/* Coming Soon Nav Items */
.nav-coming-soon {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: not-allowed;
    color: rgba(160, 160, 168, 0.35);
    position: relative;
    user-select: none;
}

.nav-coming-soon i {
    font-size: 18px;
}

.coming-soon-badge {
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(114, 137, 218, 0.5);
    background: rgba(114, 137, 218, 0.08);
    border: 1px solid rgba(114, 137, 218, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
    white-space: nowrap;
}

/* Range input with fill color */
input[type="range"] {
    flex-grow: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-main);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    transition: 0.2s;
    margin-top: -5px;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--primary);
}

/* Loop active state */
.btn-icon.active {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-icon:hover { color: var(--text-main); transform: scale(1.1); }
.btn-icon.btn-sm { font-size: 16px; }

.btn-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--text-main);
    color: var(--bg-dark);
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-main:hover {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(255,255,255,0.4);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 200px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* Beautiful Live Lyrics Panel */
.lyrics-panel {
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow: hidden;
    position: relative;
}

.lyrics-panel h3 {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.lyrics-container {
    flex-grow: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 20% 10px 60% 10px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* Hide scrollbar for aesthetics */
.lyrics-container::-webkit-scrollbar { display: none; }

.lyric-placeholder {
    color: rgba(255,255,255,0.2);
    text-align: center;
    margin-top: 50%;
    font-style: italic;
}

.lyric-line {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 16px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: left center;
}

.lyric-line.active {
    color: #ffffff;
    font-size: 24px;
    transform: scale(1.05);
    text-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary-glow);
}

/* Queue List Overhaul */
.music-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 25px;
}

.queue-list {
    list-style: none;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.queue-list::-webkit-scrollbar {
    width: 6px;
}
.queue-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.queue-item {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    margin-bottom: 10px;
    transition: 0.2s;
    position: relative;
}

.queue-item:hover {
    background: rgba(114, 137, 218, 0.1);
    border-color: rgba(255, 255, 255, 0.05);
}

.q-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.q-author {
    font-size: 12px;
    color: var(--text-muted);
}

.q-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.queue-item:hover .q-controls {
    opacity: 1;
}

.q-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-main);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.q-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.q-btn.danger:hover {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(240, 71, 71, 0.5);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn:hover {
    background: #5b73c7;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Guild Dropdown */
.guild-dropdown {
    position: relative;
    margin-bottom: 15px;
    z-index: 20;
}

.guild-dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.guild-dropdown-selected:hover {
    border-color: var(--primary);
    background: rgba(114,137,218,0.08);
}

.guild-dropdown-selected.open {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    border-radius: 12px 12px 0 0;
}

.guild-dropdown-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.guild-dropdown-current {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.guild-dropdown-current img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.guild-dropdown-arrow {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s;
}

.guild-dropdown-selected.open .guild-dropdown-arrow {
    transform: rotate(180deg);
}

.guild-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #18181b;
    border: 1px solid var(--primary);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.guild-dropdown-menu.hidden { display: none; }

.guild-dropdown-menu::-webkit-scrollbar { width: 4px; }
.guild-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.guild-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 14px;
}

.guild-dropdown-item:last-child { border-bottom: none; }

.guild-dropdown-item:hover {
    background: rgba(114,137,218,0.15);
}

.guild-dropdown-item.active {
    background: rgba(114,137,218,0.2);
    color: var(--primary);
}

.guild-dropdown-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guild-dropdown-item .guild-initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
/* VC Status Bar */
.vc-status-bar {
    margin: 0 0 14px 0;
    min-height: 36px;
}

.vc-status-bar.hidden { display: none; }

.vc-connected {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(67, 181, 129, 0.08);
    border: 1px solid rgba(67, 181, 129, 0.25);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--success);
}

.vc-connected.hidden { display: none; }

.vc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    flex-shrink: 0;
    animation: vcPulse 2s ease-in-out infinite;
}

@keyframes vcPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--success); }
    50% { opacity: 0.6; box-shadow: 0 0 12px var(--success); }
}

.vc-channel-name {
    font-weight: 600;
    color: var(--success);
    text-decoration: none;
    transition: 0.15s;
}

.vc-channel-name:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.vc-members {
    margin-left: auto;
    color: rgba(67, 181, 129, 0.6);
    font-size: 12px;
}

.vc-disconnected {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(240, 71, 71, 0.08);
    border: 1px solid rgba(240, 71, 71, 0.25);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: #f04747;
    animation: vcShake 0.4s ease;
}

.vc-disconnected.hidden { display: none; }

@keyframes vcShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* VC Auto-select prompt */
.vc-auto-prompt {
    margin: 0 0 14px 0;
}

.vc-auto-prompt.hidden { display: none; }

.vc-auto-prompt-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(114, 137, 218, 0.1);
    border: 1px solid rgba(114, 137, 218, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    animation: promptSlide 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes promptSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vc-auto-prompt-inner > i {
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.vc-auto-prompt-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    line-height: 1.4;
}

.vc-auto-prompt-text span:first-child {
    font-weight: 600;
    color: var(--text-main);
}

.vc-auto-prompt-text span:last-child {
    color: var(--text-muted);
    font-size: 12px;
}

.vc-auto-btn {
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.vc-auto-btn:hover {
    background: #5b73c7;
    box-shadow: 0 0 12px var(--primary-glow);
    transform: scale(1.03);
}

.vc-auto-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.15s;
    flex-shrink: 0;
}

.vc-auto-dismiss:hover {
    color: var(--danger);
    background: rgba(240, 71, 71, 0.1);
}

/* Control button tooltips & responsiveness */
.ctrl-btn {
    position: relative;
}

.ctrl-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 28, 0.95);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-50%) translateY(4px);
    z-index: 100;
}

.ctrl-btn:hover .ctrl-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Active states for toggle buttons */
.btn-icon.active {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.btn-icon.active .ctrl-tooltip {
    color: var(--primary);
}

/* Loop indicator dot for loop-all mode */
.btn-icon.loop-all::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 4px var(--primary);
}

/* Stop button */
.btn-stop {
    color: rgba(240, 71, 71, 0.6) !important;
}

.btn-stop:hover {
    color: var(--danger) !important;
    text-shadow: 0 0 10px rgba(240,71,71,0.5);
}

/* Button press feedback */
.ctrl-btn:active {
    transform: scale(0.9);
}

.btn-main:active {
    transform: scale(0.92) !important;
}

/* Lyrics panel header */
.lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    z-index: 2;
}

.lyrics-header h3 {
    margin-bottom: 0;
}

/* Manual lyrics search box */
.lyrics-search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    animation: promptSlide 0.25s ease;
}

.lyrics-search-box.hidden { display: none; }

.lyrics-search-box input {
    flex-grow: 1;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    padding: 7px 12px;
    outline: none;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.lyrics-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.lyrics-search-box button {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.lyrics-search-box button:hover {
    background: #5b73c7;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════════ */

/* Hamburger button */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: 0.2s;
    flex-shrink: 0;
}
.hamburger:hover { background: var(--glass-bg); }

/* Sidebar close button (mobile only) */
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.2s;
    margin-left: auto;
}
.sidebar-close:hover { color: var(--text-main); background: var(--glass-bg); }

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile bottom tab bar */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(14, 14, 18, 0.97);
    border-top: 1px solid var(--glass-border);
    z-index: 50;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: 0.2s;
    padding: 6px 0;
}
.mobile-tab i { font-size: 18px; transition: 0.2s; }
.mobile-tab.active { color: var(--primary); }
.mobile-tab.active i { text-shadow: 0 0 10px var(--primary-glow); }

/* Top bar left group */
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ─── Breakpoint: tablet (≤1024px) ─── */
@media (max-width: 1024px) {
    .music-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        height: auto;
    }
    .music-sidebar {
        grid-column: 1 / -1;
    }
    .content-scroll-area {
        padding: 0 20px 40px;
    }
    .top-bar {
        padding: 20px 24px;
    }
}

/* ─── Breakpoint: mobile (≤768px) ─── */
@media (max-width: 768px) {
    /* Body needs room for bottom tab bar */
    body { overflow: hidden; }

    /* Sidebar slides in from left */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 100;
        transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        padding: 20px 16px;
    }
    .sidebar.open { left: 0; }
    .sidebar-close { display: block; }
    .sidebar-header .logo { margin-bottom: 30px; }

    /* Show hamburger */
    .hamburger { display: flex; }

    /* Glass container no longer flex-row */
    .glass-container { flex-direction: column; }

    /* Top bar compact */
    .top-bar {
        padding: 14px 16px;
    }
    .top-bar h1 { font-size: 18px; }

    /* Content area — account for top bar + bottom tabs */
    .content-scroll-area {
        padding: 0 12px 70px;
        overflow-y: auto;
        height: calc(100vh - 60px - 60px);
    }

    /* Stack music layout to single column */
    .music-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
        height: auto;
    }

    /* Show bottom tab bar */
    .mobile-tab-bar {
        display: flex;
    }

    /* Panels: player always shows first, others hidden until tab selected */
    .lyrics-panel,
    .music-sidebar {
        display: none;
    }
    .player-main {
        display: flex;
    }

    /* Player panel adjustments */
    .player-main {
        padding: 16px;
        border-radius: 16px;
    }

    /* Album art smaller on mobile */
    .now-playing {
        gap: 16px;
        flex-direction: row;
        align-items: center;
    }
    .album-art {
        width: 90px;
        height: 90px;
        border-radius: 14px;
        font-size: 36px;
        flex-shrink: 0;
    }
    .track-details h2 { font-size: 17px; }
    .track-details p  { font-size: 13px; }

    /* Controls tighter */
    .player-controls { gap: 14px; }
    .control-buttons { gap: 16px; }
    .btn-main { width: 48px; height: 48px; font-size: 18px; }
    .btn-icon.btn-sm { font-size: 17px; }

    /* Hide tooltips on touch devices */
    .ctrl-tooltip { display: none; }

    /* Volume row compact */
    .volume-control { max-width: 100%; }

    /* Search input full width */
    .music-search-container { margin: 10px 0 16px; }

    /* Lyrics panel full height when shown */
    .lyrics-panel {
        flex-direction: column;
        height: calc(100vh - 130px);
        border-radius: 16px;
    }
    .lyrics-container {
        flex-grow: 1;
        padding: 10% 10px 40% 10px;
    }

    /* Queue panel full height when shown */
    .music-sidebar {
        flex-direction: column;
        height: calc(100vh - 130px);
        border-radius: 16px;
        padding: 16px;
    }

    /* VC prompt wraps on small screens */
    .vc-auto-prompt-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Guild dropdown full width */
    .guild-dropdown { width: 100%; }

    /* System status text hidden on tiny screens */
    @media (max-width: 380px) {
        #connectionStatus { display: none; }
        .top-bar h1 { font-size: 16px; }
    }
}

/* ─── Touch: larger tap targets ─── */
@media (hover: none) {
    .btn-icon { min-width: 40px; min-height: 40px; }
    .queue-item { padding: 14px; }
    .search-item { padding: 12px 15px; }
    .guild-dropdown-item { padding: 12px 15px; }
}

/* ═══════════════════════════════════════════
   STOCKS TAB
═══════════════════════════════════════════ */

.stocks-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.stocks-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 4px;
}

.stocks-main::-webkit-scrollbar { width: 4px; }
.stocks-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.stocks-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 4px;
}

.stocks-sidebar::-webkit-scrollbar { width: 4px; }
.stocks-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Header */
.stocks-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 22px;
    border-radius: 16px;
    gap: 12px;
}

.stocks-header-left h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.stocks-header-left h2 i { color: var(--primary); }

.market-news-ticker {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    display: block;
    max-width: 500px;
}

.stocks-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.market-event-badge {
    background: rgba(249,115,22,0.15);
    border: 1px solid rgba(249,115,22,0.3);
    color: #fb923c;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: eventPulse 2s ease-in-out infinite;
}

@keyframes eventPulse {
    0%,100% { box-shadow: 0 0 0 rgba(249,115,22,0.3); }
    50% { box-shadow: 0 0 10px rgba(249,115,22,0.4); }
}

.market-last-update { font-size: 11px; color: var(--text-muted); }

/* Chart card */
.stock-chart-card {
    padding: 20px;
    border-radius: 16px;
}

.stock-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stock-chart-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.stock-chart-symbol { font-size: 20px; font-weight: 700; }
.stock-chart-name   { font-size: 13px; color: var(--text-muted); }
.stock-chart-price  { font-size: 22px; font-weight: 700; }
.stock-chart-change { font-size: 14px; font-weight: 600; }
.stock-chart-change.positive { color: var(--success); }
.stock-chart-change.negative { color: var(--danger); }

.stock-chart-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.stock-sector-badge {
    font-size: 11px;
    background: rgba(114,137,218,0.15);
    border: 1px solid rgba(114,137,218,0.25);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 20px;
}

.stock-sentiment { font-size: 12px; font-weight: 600; }
.stock-sentiment.positive { color: var(--success); }
.stock-sentiment.negative { color: var(--danger); }

/* Market table */
.market-table-card { padding: 16px; border-radius: 16px; }

.market-table-header {
    display: grid;
    grid-template-columns: 60px 1fr 90px 80px 90px 50px;
    gap: 8px;
    padding: 6px 8px 10px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

.market-table-body { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }

.market-row {
    display: grid;
    grid-template-columns: 60px 1fr 90px 80px 90px 50px;
    gap: 8px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.15s;
    align-items: center;
    font-size: 13px;
}

.market-row:hover { background: rgba(255,255,255,0.04); }
.market-row.selected { background: rgba(114,137,218,0.12); border: 1px solid rgba(114,137,218,0.25); }

.market-symbol { font-weight: 700; font-size: 13px; color: var(--primary); }
.market-name { color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-price { font-weight: 600; }
.market-change { font-weight: 600; font-size: 12px; }
.market-change.positive { color: var(--success); }
.market-change.negative { color: var(--danger); }
.market-sector-tag { font-size: 11px; color: var(--text-muted); }
.market-trend { font-size: 14px; font-weight: 700; text-align: center; }
.trend-up   { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-neutral { color: var(--text-muted); }

/* Portfolio */
.stocks-portfolio-card { padding: 18px; border-radius: 16px; }
.stocks-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.stocks-section-header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stocks-section-header h3 i { color: var(--primary); }

.portfolio-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.portfolio-stat {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.portfolio-stat.highlight { background: rgba(114,137,218,0.1); border: 1px solid rgba(114,137,218,0.2); }
.portfolio-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.portfolio-stat-val { font-size: 14px; font-weight: 700; }

.portfolio-holdings { display: flex; flex-direction: column; gap: 4px; }
.portfolio-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 12px; }

.portfolio-holding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s;
    background: rgba(0,0,0,0.2);
}

.portfolio-holding:hover { background: rgba(114,137,218,0.1); }
.portfolio-holding-info { display: flex; flex-direction: column; gap: 1px; }
.portfolio-holding-sym  { font-size: 13px; font-weight: 700; color: var(--primary); }
.portfolio-holding-name { font-size: 11px; color: var(--text-muted); }
.portfolio-holding-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.portfolio-holding-val  { font-size: 13px; font-weight: 600; }
.portfolio-holding-qty  { font-size: 11px; color: var(--text-muted); }
.portfolio-holding-change { font-size: 11px; font-weight: 600; }
.portfolio-holding-change.positive { color: var(--success); }
.portfolio-holding-change.negative { color: var(--danger); }

/* Trade panel */
.stocks-trade-card { padding: 18px; border-radius: 16px; }
.stocks-trade-card h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.stocks-trade-card h3 i { color: var(--accent); }

.trade-form { display: flex; flex-direction: column; gap: 10px; }

.trade-stock-select {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.trade-stock-select:hover { border-color: var(--primary); }

.trade-dropdown {
    background: #18181b;
    border: 1px solid rgba(114,137,218,0.3);
    border-radius: 10px;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.trade-dropdown.hidden { display: none; }
.trade-dropdown::-webkit-scrollbar { width: 4px; }
.trade-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.trade-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    cursor: pointer;
    transition: 0.15s;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.trade-dropdown-item:last-child { border-bottom: none; }
.trade-dropdown-item:hover { background: rgba(114,137,218,0.15); }
.trade-dd-sym  { font-weight: 700; color: var(--primary); min-width: 44px; }
.trade-dd-name { flex-grow: 1; color: var(--text-muted); font-size: 12px; }
.trade-dd-price { font-weight: 600; font-size: 12px; }

.trade-price-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

.trade-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trade-qty-btn {
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--text-main);
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
}

.trade-qty-btn:hover { background: var(--primary); }

.trade-qty-input {
    flex-grow: 1;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 6px;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.trade-qty-input:focus { border-color: var(--primary); }

.trade-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px 12px;
}

.trade-total-val { font-size: 16px; font-weight: 700; color: var(--text-main); }

.trade-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.trade-btn {
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.trade-btn.buy  { background: rgba(67,181,129,0.2); color: var(--success); border: 1px solid rgba(67,181,129,0.3); }
.trade-btn.sell { background: rgba(240,71,71,0.15); color: var(--danger);  border: 1px solid rgba(240,71,71,0.25); }
.trade-btn.buy:hover  { background: rgba(67,181,129,0.35); box-shadow: 0 0 12px rgba(67,181,129,0.25); transform: scale(1.02); }
.trade-btn.sell:hover { background: rgba(240,71,71,0.30);  box-shadow: 0 0 12px rgba(240,71,71,0.2);  transform: scale(1.02); }
.trade-btn:active { transform: scale(0.97); }

.trade-result {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    animation: promptSlide 0.2s ease;
}

.trade-result.hidden { display: none; }
.trade-result.success { background: rgba(67,181,129,0.15); color: var(--success); border: 1px solid rgba(67,181,129,0.25); }
.trade-result.error   { background: rgba(240,71,71,0.12);  color: var(--danger);  border: 1px solid rgba(240,71,71,0.2); }

/* Leaderboard */
.stocks-leaderboard-card { padding: 18px; border-radius: 16px; }
.stocks-leaderboard-card h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.stocks-leaderboard-card h3 i { color: #fbbf24; }

.stocks-leaderboard { display: flex; flex-direction: column; gap: 6px; }

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    transition: 0.15s;
}

.leaderboard-row:hover { background: rgba(255,255,255,0.04); }
.lb-rank   { font-size: 16px; min-width: 28px; text-align: center; }
.lb-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lb-name   { flex-grow: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-values { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.lb-net    { font-size: 13px; font-weight: 700; }
.lb-breakdown { font-size: 10px; color: var(--text-muted); }

/* Loading shimmer */
.loading-shimmer {
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.market-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 20px; }

/* ═══════════════════════════════════════════
   LAST.FM TAB
═══════════════════════════════════════════ */

.lastfm-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.lastfm-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 4px;
}

.lastfm-main::-webkit-scrollbar { width: 4px; }
.lastfm-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.lastfm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 4px;
}

.lastfm-sidebar::-webkit-scrollbar { width: 4px; }
.lastfm-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Profile card */
.lastfm-profile-card { padding: 20px; border-radius: 16px; }

.lastfm-not-linked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
}

.lastfm-not-linked i { font-size: 32px; opacity: 0.4; }
.lastfm-not-linked code { background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 6px; font-size: 13px; color: var(--primary); }

.lastfm-profile-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lastfm-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.lastfm-avatar-wrap img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(114,137,218,0.4);
}

.lastfm-scrobble-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
    white-space: nowrap;
}

.lastfm-profile-info { flex-grow: 1; }

.lastfm-username-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.lastfm-username {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    transition: 0.15s;
}

.lastfm-username:hover { color: var(--primary); }

.lastfm-country { font-size: 12px; color: var(--text-muted); }

.lastfm-profile-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.lastfm-stat { display: flex; flex-direction: column; gap: 1px; }
.lastfm-stat-val   { font-size: 16px; font-weight: 700; line-height: 1; }
.lastfm-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Section label */
.lastfm-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
}

/* Now playing card */
.lastfm-now-card { padding: 18px; border-radius: 16px; }

.lastfm-nothing {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    padding: 10px 0;
}

.lastfm-now-track {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lastfm-now-art {
    position: relative;
    flex-shrink: 0;
}

.lastfm-now-art img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
}

.lastfm-now-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    border: 2px solid var(--primary);
    animation: fmPulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fmPulse {
    0%,100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.04); }
}

.lastfm-now-info { flex-grow: 1; overflow: hidden; }
.lastfm-now-title  { display: block; font-size: 16px; font-weight: 700; color: var(--text-main); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lastfm-now-title:hover { color: var(--primary); }
.lastfm-now-artist { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.lastfm-now-album  { display: block; font-size: 11px; color: rgba(160,160,168,0.6); margin-top: 2px; }

/* Animated bars */
.lastfm-bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; flex-shrink: 0; }
.lastfm-bar {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    animation: fmBar 0.8s ease-in-out infinite alternate;
}
.lastfm-bar:nth-child(1) { animation-delay: 0s;    height: 60%; }
.lastfm-bar:nth-child(2) { animation-delay: 0.15s; height: 100%; }
.lastfm-bar:nth-child(3) { animation-delay: 0.3s;  height: 45%; }
.lastfm-bar:nth-child(4) { animation-delay: 0.45s; height: 80%; }

@keyframes fmBar {
    from { transform: scaleY(0.3); }
    to   { transform: scaleY(1);   }
}

/* Recent tracks */
.lastfm-recent-card { padding: 18px; border-radius: 16px; }

.lastfm-recent-list { display: flex; flex-direction: column; gap: 4px; }

.fm-recent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 8px;
    transition: 0.15s;
}

.fm-recent-row:hover { background: rgba(255,255,255,0.04); }
.fm-recent-row.fm-recent-now { background: rgba(114,137,218,0.08); border: 1px solid rgba(114,137,218,0.15); }

.fm-recent-num  { font-size: 11px; color: var(--text-muted); min-width: 16px; text-align: center; }
.fm-recent-art  { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.fm-recent-info { flex-grow: 1; overflow: hidden; }
.fm-recent-title  { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-recent-title:hover { color: var(--primary); }
.fm-recent-artist { display: block; font-size: 11px; color: var(--text-muted); }
.fm-recent-time   { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.fm-now-badge {
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
}

/* Period selector */
.lastfm-period-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.lastfm-period-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.lastfm-period-btns { display: flex; gap: 4px; flex-wrap: wrap; }

.period-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.period-btn:hover  { color: var(--text-main); border-color: rgba(255,255,255,0.2); }
.period-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* Chart cards */
.lastfm-chart-card {
    padding: 18px;
    border-radius: 16px;
}

/* Top lists */
.lastfm-top-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

.lastfm-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lastfm-top-rank  { font-size: 11px; color: var(--text-muted); min-width: 16px; text-align: right; }
.lastfm-top-info  { flex-grow: 1; overflow: hidden; }
.lastfm-top-name  { display: block; font-size: 12px; font-weight: 600; color: var(--text-main); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lastfm-top-name:hover { color: var(--primary); }
.lastfm-top-sub   { display: block; font-size: 10px; color: var(--text-muted); }
.lastfm-top-plays { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.lastfm-top-bar-wrap {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin-top: 3px;
    overflow: hidden;
}

.lastfm-top-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — STOCKS + LASTFM
═══════════════════════════════════════════ */

@media (max-width: 1100px) {
    .stocks-layout { grid-template-columns: 1fr 300px; }
    .lastfm-layout  { grid-template-columns: 1fr 300px; }
    .market-table-header,
    .market-row { grid-template-columns: 55px 1fr 85px 75px 80px 40px; }
}

@media (max-width: 768px) {
    .stocks-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .stocks-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stocks-leaderboard-card { grid-column: 1 / -1; }
    .market-table-header { grid-template-columns: 50px 1fr 80px 70px; }
    .market-row         { grid-template-columns: 50px 1fr 80px 70px; }
    .market-sector-tag, .market-trend { display: none; }

    .lastfm-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .lastfm-sidebar { display: flex; flex-direction: column; }
}

@media (max-width: 480px) {
    .stocks-sidebar { grid-template-columns: 1fr; }
    .portfolio-stats { grid-template-columns: 1fr 1fr; }
    .portfolio-stat.highlight { grid-column: 1 / -1; }
    .lastfm-profile-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Scope selector (Global/Server) ───────── */
.stocks-scope-selector {
    display: flex;
    gap: 4px;
}

.scope-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.scope-btn:hover  { color: var(--text-main); border-color: rgba(255,255,255,0.2); }
.scope-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Leaderboard scope buttons ─────────────── */
.lb-scope-btns {
    display: flex;
    gap: 4px;
}

.lb-scope-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.lb-scope-btn:hover  { color: var(--text-main); }
.lb-scope-btn.active { background: rgba(114,137,218,0.2); border-color: var(--primary); color: var(--primary); }

/* ═══════════════════════════════════════════
   MODERATION TAB
═══════════════════════════════════════════ */

.mod-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto auto;
    gap: 18px;
    padding-bottom: 20px;
}

.mod-left  { display: flex; flex-direction: column; gap: 16px; }
.mod-right { display: flex; flex-direction: column; gap: 16px; }

.mod-log-section {
    grid-column: 1 / -1;
    padding: 20px;
    border-radius: 16px;
}

/* ── Stats row ───────────────────────────── */
.mod-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.mod-stat-card {
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mod-stat-card i { font-size: 20px; color: var(--primary); flex-shrink: 0; }
.mod-stat-val   { display: block; font-size: 22px; font-weight: 700; line-height: 1; }
.mod-stat-label { display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── Section labels/headers ──────────────── */
.mod-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mod-section-label i { color: var(--primary); }

.mod-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

/* ── Activity card ───────────────────────── */
.mod-activity-card { padding: 18px; border-radius: 16px; }

/* ── Lookup card ─────────────────────────── */
.mod-lookup-card { padding: 18px; border-radius: 16px; }

.mod-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mod-search-wrap {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.mod-search-wrap > i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.mod-search-wrap input {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    padding: 9px 12px 9px 34px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: 0.2s;
}

.mod-search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }

.mod-lookup-btn {
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}

.mod-lookup-btn:hover { background: #5b73c7; }

/* ── Autocomplete ────────────────────────── */
.mod-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #18181b;
    border: 1px solid rgba(114,137,218,0.3);
    border-radius: 10px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.mod-autocomplete.hidden { display: none; }

.mod-ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    transition: 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mod-ac-item:last-child { border-bottom: none; }
.mod-ac-item:hover { background: rgba(114,137,218,0.15); }
.mod-ac-item img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mod-ac-info { flex-grow: 1; overflow: hidden; }
.mod-ac-name { display: block; font-size: 13px; font-weight: 600; }
.mod-ac-tag  { display: block; font-size: 11px; color: var(--text-muted); }
.mod-ac-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.mod-ac-badge.timeout { background: rgba(249,115,22,0.2); color: #fb923c; }
.mod-ac-badge.bot { background: rgba(114,137,218,0.2); color: var(--primary); }

/* ── User profile ────────────────────────── */
.mod-user-profile {
    border-top: 1px solid var(--glass-border);
    padding-top: 14px;
    margin-top: 4px;
}

.mod-user-profile.hidden { display: none; }

.mod-user-header {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.mod-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
    flex-shrink: 0;
}

.mod-user-info { flex-grow: 1; overflow: hidden; }

.mod-user-name-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.mod-user-display { font-size: 17px; font-weight: 700; }
.mod-user-tag     { font-size: 13px; color: var(--text-muted); }
.mod-user-id      { font-size: 11px; color: rgba(160,160,168,0.5); font-family: monospace;
                    background: rgba(0,0,0,0.3); padding: 1px 6px; border-radius: 4px; cursor: pointer; }

.mod-user-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }

.mod-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.mod-badge.banned    { background: rgba(240,71,71,0.2);   color: var(--danger); }
.mod-badge.timed-out { background: rgba(249,115,22,0.2);  color: #fb923c; }
.mod-badge.not-in    { background: rgba(160,160,168,0.15); color: var(--text-muted); }
.mod-badge.bot       { background: rgba(114,137,218,0.2); color: var(--primary); }
.mod-badge.warns     { background: rgba(234,179,8,0.2);   color: #fbbf24; }

.mod-user-dates {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.mod-user-dates i { margin-right: 4px; }

.mod-user-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.mod-role-chip {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
}

.mod-role-chip.muted { border-color: rgba(255,255,255,0.06); color: rgba(160,160,168,0.4); }

/* ── User tabs ───────────────────────────── */
.mod-user-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 10px;
}

.mod-user-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.mod-user-tab:hover { color: var(--text-main); }
.mod-user-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.mod-tab-count {
    background: rgba(114,137,218,0.2);
    color: var(--primary);
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.mod-user-panel { display: none; }
.mod-user-panel.active { display: block; }

/* ── Warns list ──────────────────────────── */
.mod-warn-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mod-warn-row:last-child { border-bottom: none; }
.mod-warn-info { flex-grow: 1; }
.mod-warn-reason { display: block; font-size: 13px; }
.mod-warn-meta   { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.mod-warn-del {
    background: none;
    border: none;
    color: rgba(240,71,71,0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: 0.15s;
    flex-shrink: 0;
}

.mod-warn-del:hover { color: var(--danger); background: rgba(240,71,71,0.1); }

/* ── History list ────────────────────────── */
.mod-history-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mod-history-row:last-child { border-bottom: none; }
.mod-history-info { flex-grow: 1; }
.mod-history-reason { display: block; font-size: 12px; }
.mod-history-meta   { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Notes ───────────────────────────────── */
.mod-note-row {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mod-note-row:last-child { border-bottom: none; }
.mod-note-row > i { color: #fbbf24; margin-top: 2px; flex-shrink: 0; }
.mod-note-info { flex-grow: 1; }
.mod-note-text { display: block; font-size: 12px; }
.mod-note-meta { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.mod-add-note-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
}

.mod-note-input {
    flex-grow: 1;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.mod-note-input:focus { border-color: var(--primary); }

.mod-note-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.mod-note-btn:hover { background: #5b73c7; }

/* ── Action panel ────────────────────────── */
.mod-action-card { padding: 18px; border-radius: 16px; }
.mod-action-card .mod-section-label { margin-bottom: 14px; }

.mod-target-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: 0.15s;
}

.mod-target-row:hover { border-color: var(--primary); }
.mod-target-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.mod-target-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mod-target-display img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.mod-target-id { font-size: 10px; color: var(--text-muted); font-family: monospace; }

.mod-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.mod-action-btn {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
}

.mod-action-btn:hover { color: var(--text-main); transform: translateY(-1px); }
.mod-action-btn:active { transform: scale(0.97); }

.mod-action-btn.warn      { color: #fbbf24; border-color: rgba(234,179,8,0.2); }
.mod-action-btn.warn:hover{ background: rgba(234,179,8,0.1); }
.mod-action-btn.timeout   { color: #fb923c; border-color: rgba(249,115,22,0.2); }
.mod-action-btn.timeout:hover { background: rgba(249,115,22,0.1); }
.mod-action-btn.kick      { color: #f472b6; border-color: rgba(236,72,153,0.2); }
.mod-action-btn.kick:hover{ background: rgba(236,72,153,0.1); }
.mod-action-btn.ban       { color: var(--danger); border-color: rgba(240,71,71,0.25); }
.mod-action-btn.ban:hover { background: rgba(240,71,71,0.12); }
.mod-action-btn.unban,
.mod-action-btn.untimeout { color: var(--success); border-color: rgba(67,181,129,0.2); }
.mod-action-btn.unban:hover,
.mod-action-btn.untimeout:hover { background: rgba(67,181,129,0.1); }
.mod-action-btn.role-add  { color: #38bdf8; border-color: rgba(14,165,233,0.2); }
.mod-action-btn.role-add:hover { background: rgba(14,165,233,0.08); }
.mod-action-btn.role-remove { color: #a78bfa; border-color: rgba(139,92,246,0.2); }
.mod-action-btn.role-remove:hover { background: rgba(139,92,246,0.08); }
.mod-action-btn.nick      { color: #94a3b8; }
.mod-action-btn.clearwarns { color: #64748b; }

/* ── Bans card ───────────────────────────── */
.mod-bans-card { padding: 18px; border-radius: 16px; }

.mod-bans-search input {
    width: 100%;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 10px;
}

.mod-ban-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.mod-ban-list::-webkit-scrollbar { width: 4px; }
.mod-ban-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.mod-ban-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 8px;
    transition: 0.15s;
}

.mod-ban-row:hover { background: rgba(240,71,71,0.06); }
.mod-ban-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mod-ban-info   { flex-grow: 1; overflow: hidden; }
.mod-ban-name   { display: block; font-size: 13px; font-weight: 600; }
.mod-ban-reason { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-ban-id     { display: block; font-size: 10px; color: rgba(160,160,168,0.4); font-family: monospace; }

.mod-unban-btn {
    background: rgba(67,181,129,0.1);
    border: 1px solid rgba(67,181,129,0.2);
    border-radius: 7px;
    color: var(--success);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: 0.15s;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mod-unban-btn:hover { background: rgba(67,181,129,0.2); }

/* ── Top mods ────────────────────────────── */
.mod-leaderboard-card { padding: 18px; border-radius: 16px; }
.mod-leaderboard-card .mod-section-label { margin-bottom: 12px; }
.mod-top-mods { display: flex; flex-direction: column; gap: 6px; }

.mod-top-mod-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border-radius: 8px;
    transition: 0.15s;
}

.mod-top-mod-row:hover { background: rgba(255,255,255,0.04); }
.mod-top-mod-name  { flex-grow: 1; font-size: 13px; }
.mod-top-mod-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ── Action chip ─────────────────────────── */
.mod-action-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mod-action-chip.ban     { background: rgba(240,71,71,0.15); color: var(--danger); }
.mod-action-chip.kick    { background: rgba(236,72,153,0.15); color: #f472b6; }
.mod-action-chip.warn    { background: rgba(234,179,8,0.15); color: #fbbf24; }
.mod-action-chip.timeout { background: rgba(249,115,22,0.15); color: #fb923c; }
.mod-action-chip.unban   { background: rgba(67,181,129,0.12); color: var(--success); }
.mod-action-chip.untimeout { background: rgba(67,181,129,0.12); color: var(--success); }
.mod-action-chip.note    { background: rgba(234,179,8,0.1); color: #fbbf24; }
.mod-action-chip.clearwarns { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* ── Mod Log ─────────────────────────────── */
.mod-log-header { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

.mod-log-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.mod-filter-select,
.mod-filter-input {
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    padding: 6px 10px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: 0.2s;
}

.mod-filter-select:focus,
.mod-filter-input:focus { border-color: var(--primary); }

.mod-filter-select option { background: #18181b; }

.mod-filter-clear {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.mod-filter-clear:hover { color: var(--text-main); border-color: rgba(255,255,255,0.2); }

.mod-log-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 420px;
    overflow-y: auto;
}

.mod-log-list::-webkit-scrollbar { width: 4px; }
.mod-log-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.mod-log-row {
    display: grid;
    grid-template-columns: 100px 160px 1fr 130px 90px;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s;
    font-size: 12px;
}

.mod-log-row:hover { background: rgba(255,255,255,0.04); }

.mod-log-target {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
}

.mod-log-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mod-log-name   { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-log-id     { display: block; font-size: 10px; color: rgba(160,160,168,0.4); font-family: monospace; }
.mod-log-reason { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-log-mod    { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.mod-log-mod span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.mod-log-time   { color: rgba(160,160,168,0.5); white-space: nowrap; text-align: right; }

.mod-log-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--text-muted);
}

.mod-page-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 12px;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.mod-page-btn:hover:not(:disabled) { background: rgba(114,137,218,0.15); border-color: var(--primary); }
.mod-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Action Modal ────────────────────────── */
.mod-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}

.mod-modal-overlay.hidden { display: none; }

.mod-modal {
    width: 100%;
    max-width: 440px;
    border-radius: 18px;
    padding: 24px;
    animation: promptSlide 0.2s cubic-bezier(0.25,1,0.5,1);
}

.mod-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.mod-modal-header span { font-size: 17px; font-weight: 700; }

.mod-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.15s;
}

.mod-modal-close:hover { color: var(--text-main); background: var(--glass-bg); }

.mod-modal-target {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.mod-modal-target img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }

.mod-modal-warning {
    background: rgba(240,71,71,0.1);
    border: 1px solid rgba(240,71,71,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--danger);
    margin-bottom: 10px;
}

.mod-modal-field-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 6px; margin-top: 10px; }

.mod-modal-field-input {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    color: white;
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 8px;
    transition: 0.2s;
}

.mod-modal-field-input:focus { border-color: var(--primary); }
.mod-modal-field-input option { background: #18181b; }

.mod-duration-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }

.mod-dur-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
}

.mod-dur-btn:hover  { color: var(--text-main); }
.mod-dur-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.mod-modal-reason {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    color: white;
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    margin: 10px 0 14px;
    transition: 0.2s;
}

.mod-modal-reason:focus { border-color: var(--primary); }

.mod-modal-buttons { display: flex; gap: 8px; }

.mod-modal-cancel {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.mod-modal-cancel:hover { color: var(--text-main); }

.mod-modal-confirm {
    flex: 2;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
}

.mod-modal-confirm:hover { background: #5b73c7; box-shadow: 0 0 12px var(--primary-glow); }
.mod-modal-confirm.danger { background: var(--danger); }
.mod-modal-confirm.danger:hover { background: #c93c3c; box-shadow: 0 0 12px rgba(240,71,71,0.4); }
.mod-modal-confirm:disabled { opacity: 0.6; cursor: not-allowed; }

.mod-modal-result {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    animation: promptSlide 0.2s ease;
}

.mod-modal-result.hidden { display: none; }
.mod-modal-result.success { background: rgba(67,181,129,0.15); color: var(--success); border: 1px solid rgba(67,181,129,0.25); }
.mod-modal-result.error   { background: rgba(240,71,71,0.12); color: var(--danger); border: 1px solid rgba(240,71,71,0.2); }

.mod-hint-inline { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ── Toast ───────────────────────────────── */
#modToast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(14,14,18,0.97);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    white-space: nowrap;
}

#modToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#modToast.success { border-color: rgba(67,181,129,0.4); color: var(--success); }
#modToast.error   { border-color: rgba(240,71,71,0.4); color: var(--danger); }

/* ── Misc helpers ────────────────────────── */
.mod-empty   { font-size: 12px; color: var(--text-muted); text-align: center; padding: 12px; }
.mod-error   { font-size: 13px; color: var(--danger); padding: 12px; display: flex; align-items: center; gap: 8px; }
.mod-loading { font-size: 13px; color: var(--text-muted); padding: 20px; text-align: center; }
.mod-hint    { font-size: 13px; color: var(--text-muted); text-align: center; padding: 20px; grid-column: 1 / -1; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 1200px) {
    .mod-stats-row { grid-template-columns: repeat(3, 1fr); }
    .mod-log-row   { grid-template-columns: 90px 140px 1fr 100px; }
    .mod-log-time  { display: none; }
}

@media (max-width: 900px) {
    .mod-layout {
        grid-template-columns: 1fr;
    }
    .mod-right { display: grid; grid-template-columns: 1fr 1fr; }
    .mod-bans-card { grid-column: 1 / -1; }
    .mod-log-row { grid-template-columns: 80px 1fr 1fr; }
    .mod-log-mod, .mod-log-time { display: none; }
}

@media (max-width: 600px) {
    .mod-stats-row { grid-template-columns: repeat(2, 1fr); }
    .mod-stats-row .mod-stat-card:last-child { grid-column: 1 / -1; }
    .mod-right { grid-template-columns: 1fr; }
    .mod-action-grid { grid-template-columns: 1fr 1fr; }
    .mod-log-row { grid-template-columns: 80px 1fr; }
    .mod-log-reason { display: none; }
}

/* ═══════════════════════════════════════════
   LOGIN WALL
═══════════════════════════════════════════ */
#loginWall {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 12, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#loginWall.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.login-wall-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 360px;
    width: 90%;
    animation: promptSlide 0.4s cubic-bezier(0.25,1,0.5,1);
}

.login-wall-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 30px rgba(114,137,218,0.3);
}

.login-wall-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--text-main);
    text-shadow: 0 0 40px rgba(255,255,255,0.15);
}

.login-wall-sub {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-wall-btn {
    background: #5865f2;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    font-family: 'Outfit', sans-serif;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

.login-wall-btn:hover {
    background: #4752c4;
    box-shadow: 0 0 20px rgba(88,101,242,0.4);
    transform: translateY(-1px);
}

.login-wall-btn i { font-size: 18px; }

/* ═══════════════════════════════════════════
   SIDEBAR USER CARD
═══════════════════════════════════════════ */
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    user-select: none;
}

.sidebar-user-card:hover { background: rgba(255,255,255,0.06); }

.sidebar-user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-user-status {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #23a559;
    border: 2px solid var(--bg-dark);
    box-shadow: 0 0 6px rgba(35,165,89,0.6);
}

.sidebar-user-info {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-tag {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 13px;
    transition: 0.15s;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover { color: var(--danger); background: rgba(240,71,71,0.1); }

/* ═══════════════════════════════════════════
   DISCORD PROFILE POPUP
═══════════════════════════════════════════ */
.discord-profile-popup {
    position: fixed;
    width: 300px;
    background: #1e1f22;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
    z-index: 5000;
    animation: promptSlide 0.2s cubic-bezier(0.25,1,0.5,1);
}

.discord-profile-popup.hidden { display: none; }

.dpp-banner {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.dpp-avatar-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 16px;
    margin-top: -40px;
    margin-bottom: 4px;
}

.dpp-avatar-wrap {
    position: relative;
}

.dpp-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 6px solid #1e1f22;
    object-fit: cover;
}

.dpp-status-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #23a559;
    border: 4px solid #1e1f22;
}

.dpp-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-self: flex-end;
    margin-bottom: 4px;
    padding-top: 8px;
}

.dpp-badge {
    font-size: 18px;
    line-height: 1;
    cursor: default;
    transition: transform 0.15s;
}

.dpp-badge:hover { transform: scale(1.2); }

.dpp-body {
    padding: 4px 16px 16px;
}

.dpp-name {
    font-size: 20px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.dpp-username {
    font-size: 13px;
    color: #b5bac1;
    margin-bottom: 6px;
}

.dpp-nitro {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #c9a8ff;
    background: rgba(201,168,255,0.1);
    border: 1px solid rgba(201,168,255,0.2);
    border-radius: 20px;
    padding: 2px 8px;
    margin-bottom: 6px;
}

.dpp-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 10px 0;
}

.dpp-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #b5bac1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.dpp-since {
    font-size: 13px;
    color: #dbdee1;
}

.dpp-logout-btn {
    width: 100%;
    background: rgba(240,71,71,0.15);
    border: 1px solid rgba(240,71,71,0.25);
    border-radius: 8px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    margin-top: 4px;
    font-family: 'Outfit', sans-serif;
}

.dpp-logout-btn:hover {
    background: rgba(240,71,71,0.25);
    box-shadow: 0 0 12px rgba(240,71,71,0.2);
}

/* ═══════════════════════════════════════════
   WAVEFORM VISUALIZER
═══════════════════════════════════════════ */
.waveform-canvas {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 12px;
    opacity: 0.9;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════
   DRAG-TO-REORDER QUEUE
═══════════════════════════════════════════ */
.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.15s;
    cursor: default;
    border: 1px solid transparent;
    user-select: none;
}

.queue-item:hover { background: rgba(255,255,255,0.04); }

.queue-item.q-dragging {
    opacity: 0.4;
    background: rgba(114,137,218,0.08);
}

.queue-item.q-drag-over {
    border-color: rgba(114,137,218,0.5);
    background: rgba(114,137,218,0.08);
}

.q-drag-handle {
    color: rgba(160,160,168,0.3);
    cursor: grab;
    font-size: 12px;
    padding: 2px 4px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.queue-item:hover .q-drag-handle { color: rgba(160,160,168,0.7); }
.q-drag-handle:active { cursor: grabbing; }

.q-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--primary);
}

.q-body {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.q-title {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-author {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.q-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.queue-item:hover .q-controls { opacity: 1; }

/* ═══════════════════════════════════════════
   LAST.FM HEATMAP
═══════════════════════════════════════════ */
.lastfm-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-rows: auto auto;
    gap: 18px;
}

.lastfm-heatmap-card {
    grid-column: 1 / -1;
    padding: 20px 22px;
    border-radius: 16px;
}


/* ===============================================================
   LASTFM CHART BUILDER
=============================================================== */
.lastfm-chart-builder {
    grid-column: 1 / -1;
    padding: 20px;
    border-radius: 16px;
    margin-top: 4px;
}

.fm-cb-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 10px;
}

.fm-cb-controls { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.fm-cb-row      { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.fm-cb-style-row { padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); }

.fm-cb-group    { display: flex; flex-direction: column; gap: 5px; }
.fm-cb-toggle-group { min-width: 72px; }
.fm-cb-label    { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.fm-cb-btns     { display: flex; gap: 4px; flex-wrap: wrap; }
.fm-cb-btn {
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.fm-cb-btn:hover  { border-color: rgba(255,255,255,0.25); color: var(--text-main); }
.fm-cb-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.fm-cb-slider {
    -webkit-appearance: none;
    width: 110px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.12);
    outline: none;
    cursor: pointer;
}
.fm-cb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.fm-cb-color {
    width: 38px; height: 30px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: none;
    cursor: pointer;
    padding: 2px;
}

.fm-cb-generate-btn {
    margin-left: auto;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.fm-cb-generate-btn:hover  { opacity: 0.85; }
.fm-cb-generate-btn:active { opacity: 0.7; }

.fm-cb-preview {
    margin-top: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    overflow: hidden;
}

.fm-cb-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    padding: 30px;
}

.fm-cb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    padding: 40px;
}
.fm-cb-loading i { font-size: 24px; color: var(--primary); }

.fm-cb-error {
    color: #ff5555;
    font-size: 13px;
    padding: 20px;
    text-align: center;
}

.fm-cb-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
}

.fm-cb-img {
    max-width: 100%;
    max-height: 520px;
    display: block;
    border-radius: 8px 8px 0 0;
    image-rendering: crisp-edges;
}

.fm-cb-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0,0,0,0.3);
    border-radius: 0 0 8px 8px;
}

.fm-cb-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}
.fm-cb-download-btn:hover { opacity: 0.85; }

.fm-cb-meta {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .fm-cb-row { gap: 10px; }
    .fm-cb-generate-btn { margin-left: 0; width: 100%; justify-content: center; }
    .fm-cb-slider { width: 80px; }
}

.lastfm-heatmap-card .lastfm-section-label {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lastfm-heatmap-sub {
    font-size: 10px;
    color: rgba(160,160,168,0.5);
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-left: 4px;
}

.fm-heatmap-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
}

.fm-heatmap-scroll::-webkit-scrollbar { height: 4px; }
.fm-heatmap-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.fm-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 10px;
    color: rgba(160,160,168,0.5);
    justify-content: flex-end;
}

.fm-heatmap-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* ═══════════════════════════════════════════
   GENRE BREAKDOWN
═══════════════════════════════════════════ */
.fm-genre-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 12px;
}

.fm-genre-row {
    display: grid;
    grid-template-columns: 10px 90px 1fr 36px;
    align-items: center;
    gap: 8px;
}

.fm-genre-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fm-genre-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-genre-bar-wrap {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.fm-genre-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.25,1,0.5,1);
}

.fm-genre-pct {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

/* ═══════════════════════════════════════════
   SERVER ANALYTICS
═══════════════════════════════════════════ */
.analytics-section {
    grid-column: 1 / -1;
    padding: 22px;
    border-radius: 16px;
}

.analytics-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.analytics-server-info {
    font-size: 12px;
    color: var(--text-muted);
    flex-grow: 1;
}

.analytics-range-btns {
    display: flex;
    gap: 4px;
}

.analytics-range-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
}

.analytics-range-btn:hover  { color: var(--text-main); }
.analytics-range-btn.active { background: rgba(114,137,218,0.2); border-color: var(--primary); color: var(--primary); }

.analytics-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.analytics-stat-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-stat-card i {
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.analytics-stat-val   { display: block; font-size: 20px; font-weight: 700; line-height: 1; }
.analytics-stat-label { display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }

.analytics-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.analytics-chart-card {
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
}

.analytics-chart-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1100px) {
    .lastfm-layout {
        grid-template-columns: 1fr;
    }
    .analytics-stats-row { grid-template-columns: repeat(3, 1fr); }
    .analytics-stats-row .analytics-stat-card:nth-child(n+4) { grid-column: auto; }
}

@media (max-width: 700px) {
    .analytics-stats-row { grid-template-columns: repeat(2, 1fr); }
    .analytics-charts-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   COMPACT MUSIC PLAYER
═══════════════════════════════════════════ */
.player-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fix-audio-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    flex-shrink: 0;
}

.fix-audio-btn:hover {
    color: #fbbf24;
    border-color: rgba(251,191,36,0.3);
    background: rgba(251,191,36,0.06);
}

.now-playing-compact {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 4px 0 16px;
}

.album-art-compact {
    width: 88px;
    height: 88px;
    background: rgba(0,0,0,0.5);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    transition: 0.4s ease;
}

.track-details-compact {
    flex-grow: 1;
    overflow: hidden;
}

.track-details-compact h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.track-details-compact p {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════
   CHOSEN FOR YOU
═══════════════════════════════════════════ */
.cfy-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
}

.cfy-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 56px;
    text-align: center;
}

.cfy-label i {
    font-size: 18px;
    color: #fbbf24;
}

.cfy-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-grow: 1;
    padding: 4px 2px;
    scrollbar-width: none;
}

.cfy-scroll::-webkit-scrollbar { display: none; }

.cfy-loading {
    display: flex;
    gap: 12px;
}

.cfy-skeleton {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    flex-shrink: 0;
}

.cfy-card {
    flex-shrink: 0;
    width: 120px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 0;
    transition: transform 0.2s;
}

.cfy-card:hover { transform: translateY(-3px); }
.cfy-card:hover .cfy-play-overlay { opacity: 1; }

.cfy-art {
    position: relative;
    width: 120px;
    height: 90px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: rgba(114,137,218,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 8px;
    overflow: hidden;
}

.cfy-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 12px;
}

.cfy-info { padding: 0 2px; }

.cfy-track {
    display: block;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.cfy-artist {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.cfy-genre {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(114,137,218,0.15);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.cfy-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px;
}

/* ═══════════════════════════════════════════
   MUSIC TOAST
═══════════════════════════════════════════ */
.music-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(14,14,18,0.97);
    border: 1px solid rgba(114,137,218,0.3);
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.music-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════
   FIX AUDIO MODAL
═══════════════════════════════════════════ */
.fix-modal { max-width: 400px; }

.fix-modal-body { padding-top: 4px; }

.fix-modal-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.fix-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fix-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.fix-option-btn:hover {
    background: rgba(114,137,218,0.08);
    border-color: rgba(114,137,218,0.3);
    transform: translateX(2px);
}

.fix-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.fix-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(114,137,218,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.fix-option-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fix-option-title {
    font-size: 13px;
    font-weight: 700;
}

.fix-option-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.fix-option-arrow {
    color: rgba(160,160,168,0.3);
    font-size: 11px;
    flex-shrink: 0;
}

.fix-result {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.fix-result.hidden { display: none; }
.fix-result.running { background: rgba(114,137,218,0.1); color: var(--primary); border: 1px solid rgba(114,137,218,0.2); }
.fix-result.success { background: rgba(67,181,129,0.12); color: var(--success); border: 1px solid rgba(67,181,129,0.2); }
.fix-result.error   { background: rgba(240,71,71,0.1); color: var(--danger); border: 1px solid rgba(240,71,71,0.2); }

/* ═══════════════════════════════════════════
   KO-FI TIP BUTTON
═══════════════════════════════════════════ */
.kofi-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    margin: 14px 0 0;
    background: rgba(255,94,58,0.1);
    border: 1px solid rgba(255,94,58,0.25);
    border-radius: 10px;
    color: #ff6e47;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    letter-spacing: 0.2px;
}

.kofi-btn:hover {
    background: rgba(255,94,58,0.18);
    border-color: rgba(255,94,58,0.45);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,94,58,0.18);
}

.kofi-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: saturate(1.2);
}

/* ═══════════════════════════════════════════
   QUEUE TABS + PLAYLISTS
═══════════════════════════════════════════ */
.queue-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
}

.queue-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 7px;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.queue-tab:hover { color: var(--text-main); background: rgba(255,255,255,0.04); }
.queue-tab.active { color: var(--primary); background: rgba(114,137,218,0.12); }

.queue-subpanel { display: none; flex-direction: column; flex: 1; min-height: 0; }
.queue-subpanel.active { display: flex; }

.pl-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pl-new-btn {
    background: rgba(114,137,218,0.15);
    border: 1px solid rgba(114,137,218,0.25);
    border-radius: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
}

.pl-new-btn:hover { background: rgba(114,137,218,0.25); }

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
}

.playlist-list::-webkit-scrollbar { width: 4px; }
.playlist-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.pl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.pl-empty i { font-size: 28px; opacity: 0.3; }
.pl-empty-sub { font-size: 11px; opacity: 0.6; }

.pl-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
    cursor: pointer;
}

.pl-card:hover { border-color: rgba(114,137,218,0.3); }
.pl-card.active { border-color: rgba(114,137,218,0.4); }

.pl-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
}

.pl-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(114,137,218,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

.pl-card-info { flex: 1; overflow: hidden; }
.pl-card-name { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card-meta { display: block; font-size: 10px; color: var(--text-muted); }

.pl-card-actions {
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.15s;
}

.pl-card:hover .pl-card-actions { opacity: 1; }

.pl-btn-play, .pl-btn-shuffle, .pl-btn-delete {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: 0.15s;
}

.pl-btn-play   { background: rgba(67,181,129,0.15); color: var(--success); }
.pl-btn-play:hover { background: rgba(67,181,129,0.3); }
.pl-btn-shuffle{ background: rgba(114,137,218,0.15); color: var(--primary); }
.pl-btn-shuffle:hover { background: rgba(114,137,218,0.3); }
.pl-btn-delete { background: rgba(240,71,71,0.12); color: var(--danger); }
.pl-btn-delete:hover { background: rgba(240,71,71,0.25); }

.pl-tracks {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 6px 0;
    max-height: 200px;
    overflow-y: auto;
}

.pl-tracks-empty { padding: 8px 10px; font-size: 11px; color: var(--text-muted); }

.pl-track-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: 11px;
    transition: background 0.1s;
}

.pl-track-row:hover { background: rgba(255,255,255,0.03); }
.pl-track-num  { color: var(--text-muted); min-width: 14px; text-align: right; font-size: 10px; }
.pl-track-info { flex: 1; overflow: hidden; }
.pl-track-title { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-track-artist { display: block; color: var(--text-muted); font-size: 10px; }
.pl-track-dur  { color: var(--text-muted); font-size: 10px; white-space: nowrap; }

.pl-track-remove {
    background: none;
    border: none;
    color: rgba(240,71,71,0.4);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    transition: 0.15s;
}

.pl-track-row:hover .pl-track-remove { opacity: 1; }
.pl-track-remove:hover { color: var(--danger); background: rgba(240,71,71,0.1); }

.pl-public-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 2px;
}

.queue-list--compact .queue-item { padding: 5px 8px; }
.queue-list--compact .q-thumb { width: 28px; height: 28px; }
.queue-list--compact .q-title { font-size: 11px; }
.queue-list--compact .q-author { font-size: 10px; }

/* ═══════════════════════════════════════════
   SETTINGS TAB
═══════════════════════════════════════════ */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding-bottom: 20px;
}

.settings-group {
    padding: 22px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-group-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-group-title i { color: var(--primary); }

.settings-danger .settings-group-title { color: rgba(240,71,71,0.7); }
.settings-danger .settings-group-title i { color: var(--danger); }

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row:first-of-type { padding-top: 0; }

.settings-row-info { flex: 1; min-width: 0; }
.settings-row-label { display: block; font-size: 13px; font-weight: 600; }
.settings-row-desc  { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

/* Color swatches */
.settings-color-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: white; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }

.swatch-custom {
    background: conic-gradient(from 0deg, red, yellow, lime, cyan, blue, magenta, red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    cursor: pointer;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.5));
}

.swatch-custom input { display: none; }

/* Background options */
.settings-bg-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bg-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 6px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-muted);
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.bg-opt:hover { border-color: rgba(255,255,255,0.2); color: var(--text-main); }
.bg-opt.active { border-color: var(--primary); color: var(--primary); }

.bg-opt-preview {
    width: 44px;
    height: 30px;
    border-radius: 6px;
    overflow: hidden;
}

.bg-preview-stars   { background: #0c0c0e; }
.bg-preview-gradient{ background: linear-gradient(135deg, #1a1a2e, #16213e); }
.bg-preview-dynamic { background: linear-gradient(135deg, #1a0a2e, #0e1a2e, #0a1e1a); background-size: 200%; animation: shimmer 2s infinite; }
.bg-preview-mesh    { background: radial-gradient(at 30% 30%, #1a1040 0%, transparent 60%), radial-gradient(at 70% 70%, #0a1a30 0%, transparent 60%), #090910; }
.bg-preview-dark    { background: #08080c; }
.bg-preview-custom  { background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; }

/* Slider */
.settings-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.settings-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    outline: none;
    cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 6px var(--primary-glow);
    transition: box-shadow 0.15s;
}

.settings-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 10px var(--primary-glow);
}

.settings-slider-val {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
}

/* Font options */
.settings-font-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.font-opt {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    padding: 5px 12px;
    cursor: pointer;
    transition: 0.15s;
}

.font-opt:hover { color: var(--text-main); border-color: rgba(255,255,255,0.15); }
.font-opt.active { background: rgba(114,137,218,0.15); border-color: var(--primary); color: var(--primary); }

/* Toggle switch */
.settings-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.settings-toggle input { display: none; }

.toggle-track {
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    padding: 2px;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
}

.settings-toggle input:checked + .toggle-track {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    transition: transform 0.2s cubic-bezier(0.25,1,0.5,1);
    flex-shrink: 0;
}

.settings-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(18px);
}

/* Reset/logout buttons */
.settings-reset-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.settings-reset-btn:hover {
    color: var(--text-main);
    border-color: rgba(255,255,255,0.2);
}

.settings-logout-btn {
    background: rgba(240,71,71,0.1);
    border: 1px solid rgba(240,71,71,0.2);
    border-radius: 8px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.settings-logout-btn:hover {
    background: rgba(240,71,71,0.2);
}

/* Settings toast */
.settings-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(10,10,14,0.97);
    border: 1px solid rgba(114,137,218,0.3);
    border-radius: 10px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    z-index: 9997;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.settings-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.settings-toast.error { border-color: rgba(240,71,71,0.3); color: var(--danger); }

/* Settings responsive */
@media (max-width: 900px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .settings-slider-wrap { width: 100%; }
}

/* ═══════════════════════════════════════════
   MOBILE MUSIC SUB-TABS
═══════════════════════════════════════════ */
.mobile-music-tabs {
    display: none; /* shown only on mobile via media query */
    gap: 6px;
    margin-bottom: 12px;
}

.mob-music-tab {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.15s;
    font-family: 'Outfit', sans-serif;
}

.mob-music-tab.active {
    background: rgba(114,137,218,0.15);
    border-color: rgba(114,137,218,0.35);
    color: var(--primary);
}

/* ═══════════════════════════════════════════
   MOBILE — COMPLETE REDESIGN ≤768px
═══════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Layout foundation ─────────────────── */
    body { overflow: hidden; }

    .glass-container { flex-direction: column; }

    .sidebar {
        position: fixed;
        left: -290px;
        top: 0; bottom: 0;
        width: 270px;
        z-index: 200;
        transition: left 0.3s cubic-bezier(0.25,1,0.5,1);
        padding: 24px 18px;
    }
    .sidebar.open { left: 0; }
    .sidebar-close { display: block; }
    .sidebar-header .logo { margin-bottom: 28px; }
    .hamburger { display: flex; }

    .content-scroll-area {
        padding: 0 12px 72px;
        overflow-y: auto;
        height: calc(100dvh - 58px - 62px);
        -webkit-overflow-scrolling: touch;
    }

    .top-bar { padding: 12px 14px; }
    .top-bar h1 { font-size: 17px; }

    /* ── Mobile bottom nav ─────────────────── */
    .mobile-tab-bar {
        display: flex;
        height: 62px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .mobile-tab { font-size: 9px; gap: 2px; }
    .mobile-tab i { font-size: 17px; }

    /* ── Music sub-tabs ────────────────────── */
    .mobile-music-tabs { display: flex; }

    /* ── Music layout ──────────────────────── */
    .music-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 0;
        overflow: visible;
    }

    .panel-resizer { display: none; }

    #panelPlayer {
        width: 100% !important;
        min-width: unset;
        max-width: unset;
        flex: none;
        border-radius: 16px;
        padding: 16px;
        display: flex;
        flex-direction: column;
    }

    #panelLyrics {
        width: 100% !important;
        flex: none;
        height: calc(100dvh - 190px);
        border-radius: 16px;
        padding: 14px;
        display: none; /* shown by switchMusicPanel */
    }

    #panelQueue {
        width: 100% !important;
        flex: none;
        height: calc(100dvh - 190px);
        border-radius: 16px;
        padding: 14px;
        display: none; /* shown by switchMusicPanel */
    }

    /* CFY bar horizontal scroll on mobile */
    .cfy-bar {
        padding: 10px 12px;
        gap: 10px;
    }
    .cfy-label span { display: none; } /* just icon on mobile */
    .cfy-card { width: 100px; }
    .cfy-art  { width: 100px; height: 75px; }

    /* Compact now playing */
    .now-playing-compact {
        gap: 14px;
        padding: 8px 0 12px;
    }
    .album-art-compact { width: 76px; height: 76px; border-radius: 12px; }
    .track-details-compact h2 { font-size: 15px; }
    .track-details-compact p  { font-size: 12px; }

    /* Controls */
    .player-controls { gap: 12px; }
    .control-buttons { gap: 14px; justify-content: center; }
    .btn-main { width: 48px; height: 48px; font-size: 18px; }
    .btn-icon.btn-sm { font-size: 16px; }
    .ctrl-tooltip { display: none; }
    .volume-control { gap: 8px; }

    /* Player top row */
    .player-top-row { gap: 8px; margin-bottom: 10px; }
    .fix-audio-btn span { display: none; }
    .fix-audio-btn { padding: 8px 10px; }

    /* ── Stocks tab ────────────────────────── */
    .stocks-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .stocks-sidebar {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .market-table-header,
    .market-row {
        grid-template-columns: 48px 1fr 78px 68px;
    }
    .market-sector-tag, .market-trend { display: none; }
    .stock-chart-card canvas { height: 140px !important; }

    /* ── Last.fm tab ───────────────────────── */
    .lastfm-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .lastfm-sidebar { flex-direction: column; }
    .lastfm-heatmap-card { padding: 14px; }
    .lastfm-profile-inner { flex-direction: column; align-items: flex-start; }
    .lastfm-profile-stats { gap: 8px; }
    .lastfm-chart-card canvas { max-height: 160px; }

    /* ── Moderation tab ────────────────────── */
    .mod-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .mod-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .mod-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .mod-stats-row .mod-stat-card:nth-child(n+4) { display: none; } /* hide last 2 on tiny */
    .mod-stat-card { padding: 10px 12px; }
    .mod-stat-val { font-size: 18px; }
    .mod-action-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .mod-log-section { padding: 14px; }
    .mod-log-row {
        grid-template-columns: 80px 1fr;
        font-size: 11px;
    }
    .mod-log-target, .mod-log-mod, .mod-log-time, .mod-log-reason { }
    .mod-log-mod, .mod-log-time { display: none; }
    .mod-log-filters { flex-wrap: wrap; gap: 6px; }
    .mod-filter-input { width: 100%; }
    .mod-autocomplete { width: calc(100vw - 48px); }
    .mod-user-header { gap: 10px; }
    .mod-user-avatar { width: 48px; height: 48px; }
    .mod-user-display { font-size: 15px; }

    /* Analytics mobile */
    .analytics-section { padding: 14px; }
    .analytics-stats-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .analytics-stat-card { padding: 10px; gap: 8px; }
    .analytics-stat-val { font-size: 16px; }
    .analytics-charts-grid { grid-template-columns: 1fr; }

    /* ── Settings tab ──────────────────────── */
    .settings-layout { grid-template-columns: 1fr; gap: 12px; }
    .settings-group { padding: 16px; }
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 0;
    }
    .settings-color-swatches { flex-wrap: wrap; }
    .settings-bg-options { gap: 6px; }
    .bg-opt { padding: 5px; }
    .bg-opt-preview { width: 38px; height: 26px; }
    .settings-slider-wrap { width: 100%; }
    .settings-font-options { gap: 5px; }
    .font-opt { font-size: 11px; padding: 5px 10px; }

    /* ── Modals ────────────────────────────── */
    .mod-modal { margin: 0 12px; max-width: calc(100vw - 24px); }
    .discord-profile-popup {
        width: calc(100vw - 24px);
        left: 12px !important;
        bottom: 72px !important;
    }

    /* ── Misc ─────────────────────────────── */
    @media (max-width: 380px) {
        #connectionStatus { display: none; }
        .top-bar h1 { font-size: 15px; }
        .mod-stats-row .mod-stat-card:nth-child(n+3) { display: none; }
    }
}

/* ── Touch: larger tap targets ─────────────── */
@media (hover: none) {
    .btn-icon { min-width: 40px; min-height: 40px; }
    .queue-item { padding: 10px; }
    .search-item { padding: 12px 15px; }
    .guild-dropdown-item { padding: 12px 15px; }
    .fix-option-btn { padding: 16px; }
    .pl-card-main { padding: 12px; }
    .mob-music-tab { min-height: 40px; }
    .mobile-tab { min-height: 44px; }
}

/* ═══════════════════════════════════════════
   TAB GUILD DROPDOWNS (Stocks + Moderation)
═══════════════════════════════════════════ */
.tab-guild-dropdown {
    position: relative;
    flex-shrink: 0;
}

.tab-guild-selected {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: 0.15s;
    white-space: nowrap;
    min-width: 150px;
    max-width: 220px;
}

.tab-guild-selected:hover { border-color: rgba(114,137,218,0.4); }
.tab-guild-selected i { color: var(--text-muted); font-size: 11px; }
.tab-guild-selected i:last-child { margin-left: auto; }

.tab-guild-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    max-width: 260px;
    background: #18181b;
    border: 1px solid rgba(114,137,218,0.25);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    z-index: 300;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.tab-guild-menu.hidden { display: none; }

.tab-guild-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.12s;
}

.tab-guild-item:hover { background: rgba(114,137,218,0.12); }
.tab-guild-item img { width: 22px; height: 22px; border-radius: 50%; }

/* Moderation server row */
.mod-server-row {
    margin-bottom: 14px;
    grid-column: 1 / -1;
}

.mod-server-row .tab-guild-selected {
    max-width: 300px;
}

/* ═══════════════════════════════════════════
   MUSIC HISTORY (Recently Played + Top Songs)
═══════════════════════════════════════════ */
.music-history-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.music-history-card {
    padding: 16px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.music-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.music-history-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.music-history-label i { color: var(--primary); }

.music-history-sub {
    font-size: 10px;
    color: rgba(160,160,168,0.4);
}

.music-history-scroll {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 220px;
}

.music-history-scroll::-webkit-scrollbar { width: 3px; }
.music-history-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.music-history-empty {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.music-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.music-history-item:hover { background: rgba(114,137,218,0.08); }
.music-history-item:hover .mhi-play { opacity: 1; }

.mhi-art {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.mhi-play {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.15s;
    border-radius: 7px;
}

.mhi-info { flex: 1; min-width: 0; }

.mhi-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mhi-artist {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Responsive ─── */
@media (max-width: 768px) {
    .music-history-row { grid-template-columns: 1fr; }
    .tab-guild-selected { min-width: 120px; font-size: 12px; }
    .mod-server-row .tab-guild-selected { max-width: 100%; }
    .stocks-header-right { flex-wrap: wrap; gap: 6px; }
}

/* ── ForceNick action buttons ──────────────── */
.mod-action-btn.forcenick {
    background: rgba(114,137,218,0.1);
    border-color: rgba(114,137,218,0.25);
    color: var(--primary);
}
.mod-action-btn.forcenick:hover {
    background: rgba(114,137,218,0.2);
    border-color: rgba(114,137,218,0.5);
}
.mod-action-btn.forcenick-reset {
    background: rgba(67,181,129,0.08);
    border-color: rgba(67,181,129,0.2);
    color: var(--success);
}
.mod-action-btn.forcenick-reset:hover {
    background: rgba(67,181,129,0.16);
    border-color: rgba(67,181,129,0.4);
}

/* ═══════════════════════════════════════════════════════════
   DESIGN REFRESH — Clean, tight, flat. Desktop only (>768px)
   Overrides the heavy/glowy defaults above.
   Mobile breakpoints below 768px are not affected.
═══════════════════════════════════════════════════════════ */
@media (min-width: 769px) {

    /* ── Variables ─────────────────────────── */
    :root {
        --glass-bg:     rgba(255,255,255,0.025);
        --glass-border: rgba(255,255,255,0.06);
        --sidebar-bg:   #0f0f11;
        --bg-dark:      #0f0f11;
        --primary-glow: rgba(114,137,218,0.2);
    }

    /* ── Body — kill background gradients ──── */
    body {
        background-color: #0f0f11;
        background-image: none;
    }

    /* ── Stars canvas — subtler ─────────────── */
    #dashboard-stars-canvas { opacity: 0.12; }

    /* ── Glass container — no blur ──────────── */
    .glass-container { backdrop-filter: none; }

    /* ── Sidebar — narrower, tighter ────────── */
    .sidebar {
        width: 210px;
        padding: 18px 12px;
        background: #0f0f11;
        border-right: 1px solid rgba(255,255,255,0.05);
    }

    .sidebar-header .logo {
        font-size: 15px;
        letter-spacing: 1.5px;
        margin-bottom: 22px;
        padding: 0 6px;
        gap: 8px;
    }

    .sidebar-logo-img {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        box-shadow: none;
        border: none;
    }

    /* ── Nav links — compact, flat ───────────── */
    .nav-links li {
        padding: 8px 10px;
        border-radius: 7px;
        margin-bottom: 1px;
        gap: 10px;
        font-size: 13px;
    }

    .nav-links li i { font-size: 14px; }

    .nav-links li:hover {
        background: rgba(255,255,255,0.04);
        box-shadow: none;
        color: #fff;
    }

    .nav-links li.active {
        background: rgba(255,255,255,0.06);
        border-left: 2px solid var(--primary);
        color: #fff;
        box-shadow: none;
    }

    .nav-coming-soon {
        padding: 8px 10px;
        margin-bottom: 1px;
        border-radius: 7px;
        gap: 10px;
        font-size: 13px;
    }
    .nav-coming-soon i { font-size: 14px; }

    /* ── Top bar — smaller ───────────────────── */
    .top-bar {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .top-bar h1 { font-size: 15px; font-weight: 600; }

    .system-status {
        padding: 5px 12px;
        border-radius: 6px;
        font-size: 12px;
        background: transparent;
        border-color: rgba(255,255,255,0.05);
        gap: 6px;
    }

    .status-indicator.online {
        box-shadow: none;
        width: 6px; height: 6px;
    }

    /* ── Content area ────────────────────────── */
    .content-scroll-area { padding: 14px 18px 18px; }

    /* ── Glass cards — flat, tight ───────────── */
    .glass {
        border-radius: 10px;
        padding: 14px 16px;
        border-color: rgba(255,255,255,0.055);
        background: rgba(255,255,255,0.025);
    }

    .stat-card:hover { transform: none; background: rgba(255,255,255,0.04); }
    .stat-card i { font-size: 18px; margin-bottom: 8px; }
    .stat-val { font-size: 22px; }
    .stat-label { font-size: 12px; letter-spacing: 0.5px; }

    /* ── Music layout ────────────────────────── */
    .music-layout { height: calc(100vh - 118px); }

    #panelPlayer { border-radius: 10px; margin: 0 3px 0 0; }
    #panelLyrics { margin: 0 3px; }
    #panelQueue  { margin: 0 0 0 3px; }

    .player-main { padding: 16px; }

    /* ── Album art — smaller ─────────────────── */
    .album-art {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        font-size: 32px;
        box-shadow: none;
    }

    .now-playing { gap: 14px; padding-bottom: 12px; }

    .track-details h2 { font-size: 16px; margin-bottom: 4px; }
    .track-details p  { font-size: 13px; }

    /* ── Controls — tighter ──────────────────── */
    .player-controls { gap: 12px; }
    .control-buttons { gap: 16px; }

    .btn-main {
        width: 36px;
        height: 36px;
        font-size: 14px;
        box-shadow: none;
    }

    .btn-main:hover {
        transform: scale(1.05);
        box-shadow: none;
    }

    .btn-icon { font-size: 16px; }
    .btn-icon.btn-sm { font-size: 14px; }
    .btn-icon:hover { transform: none; color: #fff; }

    .btn-icon.active {
        color: var(--primary);
        text-shadow: none;
    }

    /* ── Seek bar — thinner ──────────────────── */
    input[type="range"] { height: 3px; }

    input[type="range"]::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
        box-shadow: none;
        margin-top: -4px;
    }

    input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.1);
        box-shadow: none;
    }

    .seek-bar-container { font-size: 11px; gap: 10px; }

    /* ── Volume ──────────────────────────────── */
    .volume-control { gap: 10px; }

    /* ── Search ──────────────────────────────── */
    .music-search-container { margin: 10px 0 14px; }

    .search-box {
        padding: 8px 12px;
        border-radius: 8px;
    }

    .search-box:focus-within {
        border-color: rgba(114,137,218,0.5);
        box-shadow: none;
    }

    .search-box input { font-size: 13px; }
    .search-results-dropdown { border-radius: 8px; margin-top: 4px; }
    .search-item { padding: 8px 12px; gap: 10px; }
    .search-item img { width: 32px; height: 32px; border-radius: 5px; }
    .search-item-title { font-size: 13px; }
    .search-item-author { font-size: 11px; }

    /* ── Lyrics panel ────────────────────────── */
    .lyrics-panel { padding: 16px; }
    .lyrics-panel h3 { font-size: 11px; margin-bottom: 12px; }
    .lyric-line { font-size: 17px; margin-bottom: 12px; }
    .lyric-line.active {
        font-size: 20px;
        text-shadow: none;
        color: #fff;
    }

    /* ── Queue sidebar ───────────────────────── */
    .music-sidebar { padding: 14px; }

    .queue-item {
        padding: 7px 10px;
        border-radius: 6px;
        margin-bottom: 2px;
        background: transparent;
    }

    .queue-item:hover {
        background: rgba(255,255,255,0.04);
        border-color: transparent;
    }

    .q-title  { font-size: 12px; margin-bottom: 1px; }
    .q-author { font-size: 11px; }
    .q-controls { margin-top: 4px; }

    .q-btn:hover {
        background: var(--primary);
        box-shadow: none;
    }

    .q-btn.danger:hover {
        background: var(--danger);
        box-shadow: none;
    }

    /* ── Guild dropdown ──────────────────────── */
    .guild-dropdown { margin-bottom: 10px; }

    .guild-dropdown-selected {
        padding: 7px 10px;
        border-radius: 7px;
        font-size: 12px;
    }

    .guild-dropdown-menu { border-radius: 8px; }
    .guild-dropdown-item { padding: 8px 10px; font-size: 12px; }

    /* ── User card ───────────────────────────── */
    .user-card {
        background: transparent;
        border: none;
        border-top: 1px solid rgba(255,255,255,0.05);
        border-radius: 0;
        padding: 10px 6px 0;
        gap: 8px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        box-shadow: none;
    }

    .user-name { font-size: 12px; }
    .user-disc { font-size: 10px; }

    /* ── Login btn ───────────────────────────── */
    .login-btn {
        border-radius: 7px;
        padding: 9px;
        font-size: 13px;
    }

    .login-btn:hover { box-shadow: none; }

    /* ── CFY bar ─────────────────────────────── */
    .cfy-bar { padding: 10px 14px; border-radius: 10px; gap: 12px; }
    .cfy-card { width: 100px; }
    .cfy-art  { height: 65px; border-radius: 7px; }
    .cfy-track  { font-size: 11px; }
    .cfy-artist { font-size: 10px; }
    .cfy-genre  { font-size: 9px; }

    /* ── History row ─────────────────────────── */
    .music-history-card { padding: 12px 14px; border-radius: 10px; }
    .mhi-art { width: 32px; height: 32px; border-radius: 5px; }
    .mhi-title  { font-size: 11px; }
    .mhi-artist { font-size: 10px; }

    /* ── Player top row ──────────────────────── */
    .player-top-row { margin-bottom: 8px; gap: 8px; }

    .fix-audio-btn {
        padding: 7px 10px;
        border-radius: 7px;
        font-size: 12px;
    }

    /* ── VC prompt ───────────────────────────── */
    .vc-auto-prompt {
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .vc-auto-btn {
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
    }

    /* ── Waveform ────────────────────────────── */
    #waveformCanvas { margin: 8px 0; }

    /* ── Panel resizer ───────────────────────── */
    .panel-resizer::after { background: rgba(255,255,255,0.05); }
    .panel-resizer:hover::after,
    .panel-resizer.dragging::after {
        background: rgba(255,255,255,0.15);
        box-shadow: none;
    }

    /* ── Stocks ──────────────────────────────── */
    .stocks-header { border-radius: 10px; padding: 12px 16px; }
    .stocks-header h2 { font-size: 15px; }
    .stock-chart-card { border-radius: 10px; }
    .stocks-portfolio-card { border-radius: 10px; }
    .market-table-card { border-radius: 10px; }
    .stocks-leaderboard-card { border-radius: 10px; }
    .portfolio-stat-val { font-size: 15px; }

    /* ── Last.fm ─────────────────────────────── */
    .lastfm-profile-card { border-radius: 10px; }
    .lastfm-chart-card   { border-radius: 10px; }

    /* ── Moderation ──────────────────────────── */
    .mod-stat-card { border-radius: 10px; padding: 10px 14px; }
    .mod-stat-val  { font-size: 18px; }
    .mod-log-section { border-radius: 10px; }
    .mod-action-btn {
        border-radius: 7px;
        font-size: 12px;
        padding: 8px 10px;
    }

    /* ── Settings ────────────────────────────── */
    .settings-group { border-radius: 10px; padding: 16px; }

    /* ── Ko-fi ───────────────────────────────── */
    .kofi-btn { border-radius: 7px; font-size: 11px; padding: 7px 12px; }

    /* ── Section labels in sidebar ───────────── */
    .sidebar-section-label {
        font-size: 9px;
        letter-spacing: 1.5px;
        padding: 0 8px;
        margin: 10px 0 4px;
        color: rgba(255,255,255,0.18);
        text-transform: uppercase;
        font-weight: 600;
    }

    /* ── Loading shimmer ─────────────────────── */
    .loading-shimmer { border-radius: 6px; }

    /* ── Status glow — kill it ───────────────── */
    .status-indicator.online { box-shadow: none; }

    /* ── Tab guild dropdowns ─────────────────── */
    .tab-guild-selected { border-radius: 7px; font-size: 12px; padding: 6px 10px; }
    .tab-guild-menu     { border-radius: 8px; }
    .tab-guild-item     { border-radius: 5px; font-size: 12px; padding: 7px 10px; }

    /* ── Fade animation — snappier ───────────── */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(4px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .tab-pane { animation-duration: 0.2s; }

}
/* ════════════════════════════════════════════════════════
   VC CALL RELAY TAB
════════════════════════════════════════════════════════ */

/* ── Wrapper & header ───────────────────────────────── */
.vc-tab-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.vc-tab-header { }

.vc-tab-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.vc-tab-title-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vc-tab-icon {
    font-size: 28px;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.vc-tab-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.vc-tab-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 3px 0 0;
}

/* ── Connection status dot ──────────────────────────── */
.vc-conn-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.vc-conn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
    transition: background 0.3s;
}

.vc-conn-dot.online {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

/* ── Guild row ──────────────────────────────────────── */
.vc-guild-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.vc-guild-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ── Call content area ──────────────────────────────── */
.vc-call-content {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.vc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 200px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Idle UI ────────────────────────────────────────── */
.vc-idle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 20px 0;
}

.vc-idle-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.vc-idle-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #000));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 0 32px var(--primary-glow);
}

.vc-idle-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
}

.vc-idle-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.55;
}

.vc-action-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 780px;
}

@media (max-width: 600px) {
    .vc-action-cards { grid-template-columns: 1fr; }
}

.vc-action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 14px;
    flex-wrap: wrap;
}

.vc-action-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.vc-action-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.vc-action-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.vc-action-card-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.vc-join-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.vc-code-input {
    width: 90px;
    padding: 9px 12px;
    border-radius: 9px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    transition: border-color 0.2s;
}

.vc-code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.vc-idle-hint {
    font-size: 12px;
    color: rgba(160,160,168,0.6);
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: center;
}

/* ── Buttons ────────────────────────────────────────── */
.vc-btn {
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

.vc-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}

.vc-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.vc-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.vc-btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 2px 12px rgba(240,71,71,0.35);
}

/* ── Active call UI ─────────────────────────────────── */
.vc-active-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vc-active-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.vc-active-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vc-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: vc-pulse-dot 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes vc-pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.vc-active-code {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.vc-active-code kbd {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 2px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    margin-left: 4px;
}

.vc-active-elapsed {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ── Two-side layout ─────────────────────────────────── */
.vc-sides-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 700px) {
    .vc-sides-grid {
        grid-template-columns: 1fr;
    }
    .vc-sides-divider {
        flex-direction: row !important;
    }
}

.vc-sides-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 4px;
}

.vc-sides-divider-line {
    flex: 1;
    width: 1px;
    background: var(--glass-border);
    min-height: 40px;
}

.vc-sides-divider-icon {
    color: var(--text-muted);
    font-size: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vc-side {
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vc-side-empty {
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border-radius: 14px;
}

.vc-side-waiting {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 9px;
}

.vc-side-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vc-side-guild-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.vc-side-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vc-side-guild-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vc-side-vc-name {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Avatar grid ─────────────────────────────────────── */
.vc-avatars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    padding: 8px 0;
}

.vc-no-members {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px;
}

.vc-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 72px;
}

/* ── Speaking ring ───────────────────────────────────── */
.vc-avatar-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vc-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
    pointer-events: none;
}

.vc-ring.speaking {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(67,181,129,0.25), 0 0 14px rgba(67,181,129,0.45);
    animation: vc-ring-pulse 0.7s ease-in-out infinite alternate;
}

@keyframes vc-ring-pulse {
    from { box-shadow: 0 0 0 3px rgba(67,181,129,0.15), 0 0 10px rgba(67,181,129,0.3); }
    to   { box-shadow: 0 0 0 5px rgba(67,181,129,0.35), 0 0 20px rgba(67,181,129,0.6); }
}

.vc-avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
    display: block;
    position: relative;
    z-index: 1;
}

/* ── Audio bars ──────────────────────────────────────── */
.vc-audio-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.vc-audio-bar {
    width: 3px;
    height: 4px;
    border-radius: 2px;
    background: var(--text-muted);
    opacity: 0.35;
    transition: height 0.1s, opacity 0.15s, background 0.15s;
}

.vc-audio-bar.active {
    opacity: 1;
    background: var(--success);
}

.vc-audio-bar.active:nth-child(1) { animation: vc-bar 0.55s ease-in-out infinite alternate; }
.vc-audio-bar.active:nth-child(2) { animation: vc-bar 0.4s  ease-in-out infinite alternate 0.12s; }
.vc-audio-bar.active:nth-child(3) { animation: vc-bar 0.65s ease-in-out infinite alternate 0.25s; }

@keyframes vc-bar {
    from { height: 3px;  }
    to   { height: 13px; }
}

.vc-avatar-name {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 72px;
}

/* ── Toast ───────────────────────────────────────────── */
#vcToast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30,30,38,0.96);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(12px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
}

#vcToast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#vcToast.vc-toast-error {
    border-color: var(--danger);
    box-shadow: 0 0 12px rgba(240,71,71,0.25);
}

/* Verification Tab Styling */
.verification-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.4s ease;
}

.v-flags-card {
    overflow: hidden;
}

.v-flags-table-wrap {
    margin-top: 20px;
    overflow-x: auto;
}

.v-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.v-table th {
    text-align: left;
    padding: 12px 15px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.v-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.v-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-bg);
}

.v-username {
    font-weight: 600;
}

.v-match-reason {
    color: var(--danger);
    font-size: 13px;
    background: rgba(240, 71, 71, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.v-time {
    color: var(--text-muted);
    font-size: 12px;
}

.v-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

.v-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.v-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: 0.2s;
}

.v-history-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--primary);
}

.v-fp-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 2px 8px;
    border-radius: 4px;
}