:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    
    --accent: #00BFFF;
    --accent-glow: rgba(0, 191, 255, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

#app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 1fr 90px;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
#sidebar {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 40px;
    padding: 0 8px;
}

.brand i {
    font-size: 28px;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-links li i {
    font-size: 20px;
}

.nav-links li:hover {
    background-color: var(--bg-glass);
    color: var(--text-primary);
}

.nav-links li.active {
    background-color: var(--accent);
    color: #000;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 8px 0;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.status-dot.connected {
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.bot-links a:hover {
    color: #fff !important;
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.matrix-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
}
.matrix-footer img {
    height: 24px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.matrix-footer img:hover {
    opacity: 1;
}

/* Main Content */
#main-content {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    position: relative;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(0, 191, 255, 0.1), transparent 50%);
}

.view {
    display: none;
    padding: 40px;
    height: 100%;
    animation: fadeIn 0.4s ease forwards;
}

.view.active {
    display: flex;
    flex-direction: column;
}

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

/* Now Playing View */
#now-playing {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.album-art-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-art-container:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 191, 255, 0.2);
}

#current-album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info-large h1 {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.track-info-large h2 {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Filters View */
.header {
    margin-bottom: 30px;
}

.header h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-secondary);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.filter-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.filter-card:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(0, 191, 255, 0.3);
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-header i {
    font-size: 24px;
    color: var(--accent);
}

.filter-header h3 {
    font-family: var(--font-heading);
    flex-grow: 1;
}

.filter-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Lyrics View */
#lyrics {
    display: flex;
    flex-direction: column;
}
.lyrics-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.lyrics-toggle {
    background: var(--bg-glass);
    border-radius: 20px;
    padding: 4px;
    display: flex;
}

.lyrics-toggle button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lyrics-toggle button.active {
    background: var(--accent);
    color: #000;
}

.lyrics-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lyrics-scroll::-webkit-scrollbar {
    width: 6px;
}
.lyrics-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.lyric-line {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.lyric-line.active {
    color: var(--accent);
    transform: scale(1.05);
    transform-origin: left center;
    text-shadow: 0 0 15px var(--accent-glow);
}

.lyric-line.passed {
    color: var(--text-primary);
}

/* Video View */
.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
}

.video-placeholder i {
    font-size: 64px;
    color: var(--accent);
    opacity: 0.7;
}

.primary-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

#video-iframe {
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* Player Bar */
#player-bar {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    align-items: center;
    padding: 0 24px;
    z-index: 20;
}

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

#bar-album-art {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.bar-track-info h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.bar-track-info p {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.play-pause {
    background: var(--text-primary);
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
}

.play-pause:hover {
    transform: scale(1.1);
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    color: #000;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-thumb {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    left: 0%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.progress-bar-bg:hover .progress-thumb {
    opacity: 1;
}
.progress-bar-bg:hover .progress-bar-fill {
    background: #fff;
}

.player-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.volume-slider-bg {
    width: 100px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.volume-slider-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 3px;
    width: 100%;
}

.volume-thumb {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    left: 100%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.volume-slider-bg:hover .volume-thumb {
    opacity: 1;
}
.volume-slider-bg:hover .volume-slider-fill {
    background: var(--accent);
}

/* Search View */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}
.search-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-glass);
    padding: 12px 24px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}
.search-box i {
    font-size: 24px;
    color: var(--text-secondary);
}
.search-box input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    font-family: var(--font-body);
}
.search-results {
    flex-grow: 1;
    overflow-y: auto;
    background: var(--bg-glass);
    border-radius: 24px;
    padding: 24px;
}

/* Playlists View */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}
.playlist-card {
    background: var(--bg-glass);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.playlist-card:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-5px);
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.playlist-cover {
    width: 80px;
    height: 80px;
    background: rgba(0, 191, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent);
    font-size: 40px;
    box-shadow: 0 0 20px var(--accent-glow);
}
.playlist-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 4px;
}
.playlist-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Queue specific styles */
.queue-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-glass);
    border-radius: 12px;
    transition: background 0.3s;
}

.queue-item:hover {
    background: var(--bg-glass-hover);
}

.queue-img-container {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
}
.queue-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-info {
    flex-grow: 1;
}
.queue-info h4 {
    font-size: 15px;
    font-weight: 500;
}
.queue-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.queue-duration {
    color: var(--text-secondary);
    font-size: 14px;
}
