/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0e0f;
    color: #ffffff;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: grid;
    grid-template-areas: 
        "sidebar main"
        "now-playing now-playing";
    grid-template-columns: 300px 1fr;
    grid-template-rows: 1fr 90px;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: linear-gradient(180deg, #1a2f1a 0%, #0d1a0d 100%);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid #2a4a2a;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 12px;
}

.logo i {
    font-size: 32px;
    color: #4ade80;
    filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.3));
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav ul {
    list-style: none;
    margin-bottom: 32px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #b3b3b3;
    font-weight: 500;
    margin-bottom: 4px;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.05));
    color: #4ade80;
    transform: translateX(4px);
}

.nav-item i {
    font-size: 20px;
    width: 24px;
}

/* Library Section */
.library-section {
    flex: 1;
    margin-bottom: 24px;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px 16px;
}

.library-header h3 {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.create-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.create-btn:hover {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.music-stats {
    padding: 0 12px;
    color: #b3b3b3;
    font-size: 14px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 20px;
    padding: 16px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.upload-btn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #0a0e0f;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.upload-info {
    margin-top: 8px;
    font-size: 11px;
    text-align: center;
    color: #b3b3b3;
    opacity: 0.8;
}

/* User Section */
.user-section {
    border-top: 1px solid #2a4a2a;
    padding-top: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.user-profile:hover {
    background: rgba(74, 222, 128, 0.1);
}

.avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar i {
    font-size: 16px;
    color: #0a0e0f;
}

/* Main Content */
.main-content {
    grid-area: main;
    background: linear-gradient(180deg, #1a2f1a 0%, #0a0e0f 100%);
    overflow-y: auto;
    position: relative;
}

/* Top Bar */
/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(10, 14, 15, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.nav-buttons {
    display: flex;
    gap: 16px;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: #4ade80;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    transform: scale(1.05);
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 32px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 16px;
    color: #b3b3b3;
    font-size: 16px;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}

.search-box input::placeholder {
    color: #b3b3b3;
}

.user-menu {
    display: flex;
    gap: 12px;
}

.menu-btn {
    padding: 10px 20px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 25px;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.menu-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
}

/* Content Area */
.content-area {
    padding: 0 32px 32px;
}

.section {
    margin-bottom: 48px;
}

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

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #b3b3b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: center;
    margin-bottom: 64px;
}

.welcome-card {
    text-align: center;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.05));
    border-radius: 16px;
    padding: 48px 32px;
    max-width: 500px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.welcome-icon {
    font-size: 64px;
    color: #4ade80;
    margin-bottom: 24px;
}

.welcome-card h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #4ade80;
}

.welcome-card p {
    color: #b3b3b3;
    margin-bottom: 32px;
    line-height: 1.6;
}

.welcome-btn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    color: #0a0e0f;
    padding: 16px 32px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.welcome-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

/* Music Grid */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.music-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.music-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.music-card:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}

.card-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image i {
    font-size: 48px;
    color: #0a0e0f;
}

.play-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #4ade80;
    border: none;
    color: #0a0e0f;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.play-button:hover {
    background-color: #22c55e;
    transform: scale(1.05);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-description {
    font-size: 14px;
    color: #b3b3b3;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #b3b3b3;
    padding: 60px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    color: #4ade80;
}

.empty-state p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.add-music-btn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    color: #0a0e0f;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-music-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

/* Now Playing Bar */
.now-playing-bar {
    grid-area: now-playing;
    background: rgba(10, 14, 15, 0.9);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    padding: 16px 32px;
    border-top: 1px solid rgba(74, 222, 128, 0.1);
}

.track-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.placeholder-track-image {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0e0f;
    margin-right: 16px;
}

.placeholder-track-image i {
    font-size: 20px;
}

.track-details {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 14px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-left: 16px;
    transition: color 0.3s;
}

.like-btn:hover {
    color: #4ade80;
}

/* Player Controls */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2;
    max-width: 600px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.control-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.play-btn {
    font-size: 24px;
    width: 48px;
    height: 48px;
}

.control-btn.active {
    color: #4ade80;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.time-display {
    font-size: 12px;
    color: #b3b3b3;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: center;
}

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

.progress-fill {
    height: 100%;
    background: #4ade80;
    border-radius: 2px;
    width: 0;
    transition: width 0.1s;
}

.progress-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Volume Controls */
.volume-controls {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.loading-spinner {
    text-align: center;
    color: #ffffff;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #4ade80;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #0a0e0f;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.notification.show {
    opacity: 1;
}


.track-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.track-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.track-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.track-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay .play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4ade80;
    border: none;
    color: #0a0e0f;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-overlay .play-btn:hover {
    background: #22c55e;
    transform: scale(1.1);
}

.track-info {
    padding: 16px;
}

.track-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.track-artist {
    font-size: 14px;
    color: #b3b3b3;
    margin-bottom: 8px;
}

.track-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.duration {
    font-size: 12px;
    color: #b3b3b3;
}

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

.action-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: #4ade80;
}

.genre-card {
    background: linear-gradient(135deg, var(--genre-color), rgba(var(--genre-color), 0.7));
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.genre-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.genre-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.connection-status {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-indicator i.connected {
    color: #4ade80;
}

.status-indicator i.disconnected {
    color: #ef4444;
}

.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #b3b3b3;
}

.loading-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #4ade80;
}

.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
}

.error-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.notification {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #0a0e0f;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification.show {
    opacity: 1;
}

.control-btn.active {
    color: #4ade80;
}

.control-btn.repeat-one::after {
    content: '1';
    position: absolute;
    font-size: 10px;
    top: 2px;
    right: 2px;
}

.now-playing-bar {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.track-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.track-image {
    width: 60px; 
    height: 60px; 
    border-radius: 8px; 
    overflow: hidden; 
    margin-right: 10px; 
}

.track-image img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.placeholder-track-image {
    width: 60px; 
    height: 60px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px; 
}
