/* ACK Music - Spotify-inspired Dark Theme */
/* Design System: Acid Neon meets Noir Editorial */

:root {
    /* Spotify-inspired Dark Palette */
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --bg-tertiary: #282828;
    --bg-elevated: #1e1e1e;
    --bg-card: #181818;
    --bg-hover: #282828;
    --bg-active: #333333;
    
    /* Accent Colors */
    --accent-primary: #1db954;
    --accent-primary-hover: #1ed760;
    --accent-secondary: #1ed760;
    --accent-gradient: linear-gradient(135deg, #1db954 0%, #1ed760 100%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #6a6a6a;
    --text-muted: #535353;
    
    /* Border & Shadow */
    --border-color: #282828;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(29, 185, 84, 0.3);
    
    /* Typography */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Layout */
    --sidebar-width: 240px;
    --sidebar-collapsed: 72px;
    --player-height: 90px;
    --header-height: 64px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    animation: loading 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes loading {
    0% { width: 0%; margin-left: 0; }
    50% { width: 100%; margin-left: 0; }
    100% { width: 0%; margin-left: 100%; }
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-normal), transform var(--transition-normal);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: none;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-section {
    padding: var(--space-md) 0;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-sm);
}

.sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: var(--space-xs) var(--space-md);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
}

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

.nav-item.active .nav-link {
    background: var(--bg-active);
    color: var(--text-primary);
}

.nav-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-footer {
    margin-top: auto;
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.user-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-btn:hover {
    transform: scale(1.02);
    background: var(--accent-primary);
    color: var(--text-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-bottom: var(--player-height);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.header.scrolled {
    border-bottom-color: var(--border-color);
}

.header-search {
    flex: 1;
    max-width: 400px;
}

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

.search-icon {
    position: absolute;
    left: var(--space-md);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md) var(--space-sm) 44px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-clear {
    position: absolute;
    right: var(--space-sm);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.search-clear:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

/* Page Content */
.page-content {
    padding: var(--space-xl);
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    padding: var(--space-3xl) var(--space-xl);
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.15) 0%, rgba(18, 18, 18, 0) 50%);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-2xl);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 185, 84, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
}

/* Content Sections */
.content-section {
    margin-bottom: var(--space-2xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.see-all {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.see-all:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Songs Grid */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
}

.song-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.song-card:hover {
    background: var(--bg-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.song-thumbnail {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.song-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.song-card:hover .song-thumbnail img {
    transform: scale(1.05);
}

.song-play {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.song-play:hover {
    background: var(--accent-primary-hover);
    transform: scale(1.1);
}

.song-play svg {
    width: 20px;
    height: 20px;
    color: var(--bg-primary);
    margin-left: 2px;
}

.song-info {
    min-height: 60px;
}

.song-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-actions {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.song-card:hover .song-actions {
    opacity: 1;
}

.song-action-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.song-action-btn:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.song-action-btn.active {
    color: var(--accent-primary);
}

.song-action-btn.active:hover {
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

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

/* Playlists Grid */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.playlist-card {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.playlist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.playlist-card:hover::before {
    opacity: 1;
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.playlist-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.3;
}

.playlist-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.playlist-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.create-playlist-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.create-playlist-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

/* Admin Panel */
.admin-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-sm);
}

.admin-tab {
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.admin-tab::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--text-primary);
}

.admin-tab.active::after {
    transform: scaleX(1);
}

.admin-content {
    max-width: 600px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.file-upload {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload:hover {
    border-color: var(--accent-primary);
    background: rgba(29, 185, 84, 0.05);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
}

.file-upload-content svg {
    color: var(--text-tertiary);
}

.file-upload-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.file-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview audio {
    width: 90%;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.song-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.song-list-item:hover {
    background: var(--bg-hover);
}

.song-list-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.song-list-info {
    flex: 1;
    min-width: 0;
}

.song-list-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-list-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-list-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-full {
    width: 100%;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--player-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: left var(--transition-normal);
}

.sidebar.collapsed ~ .music-player {
    left: var(--sidebar-collapsed);
}

.player-progress {
    padding: 0 var(--space-xl);
    padding-top: var(--space-sm);
}

.progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    flex: 1;
}

.player-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
}

.player-art {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.player-details {
    min-width: 0;
}

.player-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.player-favorite {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.player-favorite:hover {
    color: var(--accent-primary);
}

.player-favorite.active {
    color: var(--accent-primary);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.play-btn {
    width: 56px;
    height: 56px;
    background: var(--text-primary);
    color: var(--bg-primary);
}

.play-btn:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    justify-content: flex-end;
}

.volume-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

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

.volume-slider {
    width: 100px;
}

.volume-input {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    cursor: pointer;
}

.volume-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.volume-input::-webkit-slider-thumb:hover {
    background: var(--accent-primary);
    transform: scale(1.2);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-small {
    max-width: 400px;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-header {
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.login-content {
    text-align: center;
}

.login-header {
    margin-bottom: var(--space-xl);
}

.login-logo {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

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

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md);
    background: var(--text-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.google-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.playlist-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    max-width: 400px;
}

.toast.error {
    border-left-color: #ff4444;
}

.toast.success {
    border-left-color: var(--accent-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(10px);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content,
    .music-player {
        margin-left: 0;
        left: 0;
    }
    
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
    
    .header {
        padding: 0 var(--space-md);
    }
    
    .header-search {
        max-width: none;
        flex: 1;
    }
    
    .page-content {
        padding: var(--space-md);
    }
    
    .hero-section {
        padding: var(--space-xl) var(--space-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .songs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .player-content {
        padding: var(--space-sm) var(--space-md);
    }
    
    .player-info {
        flex: 0 0 auto;
    }
    
    .player-art {
        width: 40px;
        height: 40px;
    }
    
    .player-details {
        display: none;
    }
    
    .player-controls {
        gap: var(--space-md);
    }
    
    .play-btn {
        width: 48px;
        height: 48px;
    }
    
    .player-volume {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .songs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .song-card {
        padding: var(--space-sm);
    }
    
    .song-thumbnail {
        margin-bottom: var(--space-sm);
    }
    
    .modal-content {
        padding: var(--space-lg);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: var(--text-primary);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

/* Stagger animation delays */
.song-card:nth-child(1) { animation-delay: 0.05s; }
.song-card:nth-child(2) { animation-delay: 0.1s; }
.song-card:nth-child(3) { animation-delay: 0.15s; }
.song-card:nth-child(4) { animation-delay: 0.2s; }
.song-card:nth-child(5) { animation-delay: 0.25s; }
.song-card:nth-child(6) { animation-delay: 0.3s; }