:root {
    --bg-color: #0b0f19;
    --sidebar-bg: #070a12;
    --accent: #c366ff;
    --accent-glow: rgba(195, 102, 255, 0.4);
    --text: #ffffff;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --panel-width: 350px;
    --sidebar-width: 260px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(195, 102, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 245, 255, 0.03) 0px, transparent 50%);
}

.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr 100px;
    height: 100vh;
    gap: 0;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Sidebar */
.sidebar {
    grid-row: 1 / 3;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 10px;
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: var(--glass-hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.sidebar-section {
    margin-top: 30px;
    padding: 0 10px;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    display: block;
}

.station-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.station-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
    width: 100%;
}

.station-item:hover {
    background: var(--glass-hover);
    color: var(--text);
}

.station-item.active {
    background: rgba(195, 102, 255, 0.1);
    color: var(--accent);
    border-color: rgba(195, 102, 255, 0.2);
}

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

.station-item.active .station-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.station-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Main Content */
.main-content {
    padding: 30px 40px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-radius: 16px;
    color: var(--text-muted);
}

.search-wrap input {
    background: transparent;
    border: none;
    padding: 15px;
    color: white;
    width: 100%;
    outline: none;
    font-family: var(--font-body);
}

.filter-wrap {
    padding: 0 10px;
    border-radius: 16px;
}

.filter-wrap select {
    background: transparent;
    border: none;
    color: white;
    padding: 15px;
    outline: none;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
}

.filter-wrap select option {
    background: var(--bg-color);
}

/* Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.rec-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.rec-card:hover {
    transform: translateY(-8px);
    background: var(--glass-hover);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.card-logo-placeholder {
    width: 28px;
    height: 28px;
    background: var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.day-badge {
    padding: 6px 14px;
    background: var(--accent);
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hour-badge {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.rec-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.card-footer {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.metadata-indicator {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 30px;
    height: 30px;
    background: rgba(195, 102, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

/* Side Panel */
.side-panel {
    position: fixed;
    top: 20px;
    right: -400px;
    bottom: 120px;
    width: var(--panel-width);
    border-radius: 24px 0 0 24px;
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.side-panel.open {
    right: 0;
}

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

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

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.panel-actions {
    margin-bottom: 25px;
}

.action-btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.action-btn:hover {
    background: var(--accent);
}

.track-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.track-item {
    background: rgba(255,255,255,0.02);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.3s;
}

.track-item:hover {
    border-color: var(--accent);
    background: rgba(195, 102, 255, 0.05);
}

.track-time {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.track-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.track-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.clip-btn {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 800;
}

/* Player Bar */
.player-bar {
    grid-column: 2 / 3;
    margin: 0 40px 20px 0;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.player-info {
    width: 300px;
}

#current-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#current-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.player-core {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-play-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px var(--accent-glow);
    transition: transform 0.2s;
}

.main-play-btn:active { transform: scale(0.9); }

.progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 45px;
}

.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    border-radius: 3px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.player-extra {
    width: 200px;
    display: flex;
    justify-content: flex-end;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

#volume-slider {
    width: 100px;
    accent-color: var(--accent);
}

/* Mobile */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr 120px;
    }
    
    .sidebar {
        grid-row: 1 / 2;
        grid-column: 1 / 2;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: auto;
    }

    .brand {
        margin-bottom: 0;
    }

    .brand-text {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        gap: 10px;
    }

    .nav-item {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 20px;
    }

    .player-bar {
        grid-column: 1 / 2;
        margin: 10px;
        height: auto;
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }

    .player-info, .player-extra {
        width: 100%;
        text-align: center;
    }
    
    .player-extra {
        justify-content: center;
    }
}
