:root {
    --bg-main: #090d16;
    --card-bg: rgba(22, 30, 49, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-hover: #4f46e5;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.35);
    --danger: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glows */
.background-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
}

/* Layout Container */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    gap: 16px;
}

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

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.badge-accent {
    font-size: 0.75rem;
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.select-wrapper select {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.select-wrapper select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.lang-switcher {
    display: flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--card-border);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

.ping-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Glass Panels */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Now Playing Card */
.now-playing-card {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .now-playing-card {
        flex-direction: column;
        text-align: center;
    }
}

.thumbnail-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Audio Visualizer Waves */
.audio-waves {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 24px;
}

.audio-waves span {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    animation: wave 1.2s ease-in-out infinite;
}

.audio-waves.paused span {
    animation-play-state: paused;
}

.audio-waves span:nth-child(1) { animation-delay: 0.1s; }
.audio-waves span:nth-child(2) { animation-delay: 0.3s; }
.audio-waves span:nth-child(3) { animation-delay: 0.2s; }
.audio-waves span:nth-child(4) { animation-delay: 0.4s; }
.audio-waves span:nth-child(5) { animation-delay: 0.15s; }

@keyframes wave {
    0%, 100% { height: 4px; }
    50% { height: 22px; }
}

.track-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.tag-status {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
}

.track-details h2 {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.track-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Progress bar */
.time-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-track {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

/* Controls */
.control-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    padding: 12px 20px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-accent {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
    background: var(--accent);
    color: #000;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

/* Volume & Voice */
.volume-voice-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.volume-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-box input[type="range"] {
    accent-color: var(--primary);
    cursor: pointer;
    width: 100px;
}

#vol-val {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 40px;
}

.voice-actions {
    display: flex;
    gap: 8px;
}

/* Search Box */
.search-form {
    margin-top: 10px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input-group input {
    flex-grow: 1;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-search {
    padding: 0 24px;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

/* Sidebar Panels */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

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

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-subtle {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.queue-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.queue-list::-webkit-scrollbar {
    width: 5px;
}
.queue-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.5);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.queue-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 80%;
}

.queue-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 30px 10px;
}

/* Channel Chips */
.channel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.channel-chip {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.channel-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(6, 182, 212, 0.1);
}

.channel-chip.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border-color: var(--accent);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Docs & Integration Section */
.docs-section {
    margin-top: 10px;
}

.domain-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.code-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.code-tab {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.code-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.code-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.code-block-wrapper {
    position: relative;
    background: #060911;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
}

.code-block-wrapper pre code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #38bdf8;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.copy-btn:hover {
    background: var(--primary);
    color: #fff;
}

