:root {
    --bg-color: #0d0d0d;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00e5ff; /* Cyan */
    --accent-glow: rgba(0, 229, 255, 0.4);
    --border: #333;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden; /* App style */
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #111;
    border-right: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: white;
}
.logo span {
    color: var(--accent);
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.nav-menu a.active {
    border-left: 3px solid var(--accent);
}

.upload-area {
    margin-top: auto;
    background: #181818;
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.3s;
}

.upload-area:hover {
    border-color: var(--accent);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 2rem;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 10;
}

.search-bar {
    background: #1a1a1a;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 400px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.content-wrapper {
    padding-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Songs Grid */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Song Card */
.song-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.artist {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Metrics Badges */
.metrics {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.metric-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.metric-badge.key { color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.2); } /* Gold */
.metric-badge.bpm { color: #ff6b6b; border: 1px solid rgba(255, 107, 107, 0.2); } /* Red */
.metric-badge.energy { color: #4ecdc4; border: 1px solid rgba(78, 205, 196, 0.2); } /* Teal */

/* Tags */
.tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 500;
}

.tag.genre { background: rgba(0, 119, 255, 0.2); color: #80bcff; }
.tag.mood { background: rgba(0, 255, 136, 0.15); color: #80ffbd; }
.tag.inst { background: rgba(200, 0, 255, 0.2); color: #eebbff; }

/* Loader */
.loader-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
