/* Base Styles */
:root {
    --primary-color: #ec4141;
    --secondary-color: #c62f2f;
    --accent-color: #ff4e4e;
    --dark-color: #121212;
    --darker-color: #0a0a0a;
    --light-color: #f8f9fa;
    --text-color: #e0e0e0;
    --text-light: #b3b3b3;
    --border-color: #282828;
    --card-bg: #181818;
    --card-hover: #282828;
    --success-color: #1db954;
    --warning-color: #ff9f43;
    --danger-color: #ff6b6b;
    --primary: #ec4141;
    --primary-dark: #d43c3c;
    --secondary: #333;
    --success: #1db954;
    --danger: #ff4d4f;
    --light: #f8f9fa;
    --dark: #333;
    --gray: #666;
    --light-gray: #f2f2f2;
    --dark-bg: #181818;
    --text-lighter: #fff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--dark-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    flex: 1;
}

/* Header */
header {
    padding: 1rem 0;
    text-align: center;
    margin: 1rem 0;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: white;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), #ff8a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

header .subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Navigation */
nav {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-lighter);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--text-lighter);
}

.nav-link.active {
    color: var(--text-lighter);
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 1rem;
    background-color: var(--card-bg);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 0.75rem 0;
    min-width: 160px;
    z-index: 100;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-lighter);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Search Container */
.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input:focus {
    outline: none;
    background-color: var(--card-hover);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(236, 65, 65, 0.3);
}

.btn:active {
    transform: scale(0.98);
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background-color: var(--gray);
}

.btn-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

.btn-danger {
    background-color: var(--danger);
}

.btn-danger:hover {
    background-color: #ff7875;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: #1ed760;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: rgba(236, 65, 65, 0.1);
    box-shadow: none;
}

.quick-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 0 0.5rem;
}

/* Results Grid */
.results-grid, .search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.result-card, .track {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-card:hover, .track:hover {
    background-color: var(--card-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    padding: 1rem;
    position: relative;
}

.cover-art {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #333, #555);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.8rem;
    color: var(--text-light);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.track-info {
    flex: 1;
}

.track-title, .result-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.track-artist, .result-meta {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.track-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.duration-badge, .genre-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
}

.card-body {
    padding: 0.5rem 1rem 1rem;
}

.uploader-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.track-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.track-selector {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.track-selector:hover {
    border-color: var(--primary-color);
}

.track-selector:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(236, 65, 65, 0.3);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0 2px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none; /* 添加这一行去掉下划线 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    .action-btn {
        width: 36px;  /* 稍微增大2px便于触摸 */
        height: 36px;
        margin: 0 3px; /* 略微增加间距 */
    }
}

/* 极小屏幕进一步优化 */
@media (max-width: 480px) {
    .action-buttons {
        gap: 0.3rem; /* 缩小间隙 */
    }
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn i {
    font-size: 1rem;
}

.play-btn {
    background-color: var(--success);
    color: white;
}

.play-btn:hover {
    background-color: #1ed760;
}

.download-btn {
    background-color: var(--primary);
    color: white;
}

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

.lyrics-btn {
    background-color: #9c27b0;
    color: white;
}

.lyrics-btn:hover {
    background-color: #8e24aa;
}

/* No Results */
.no-results-container {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.no-results-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-results-container h3 {
    margin: 0 0 0.5rem;
    color: white;
}

.no-results-container p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.browse-btn {
    display: inline-block;
    margin-top: 1rem;
    background-color: var(--primary-color);
}

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

/* Main Content */
.main-content {
    background-color: var(--dark-bg);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(236, 65, 65, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.file-label:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 65, 65, 0.3);
}

.selected-file {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-lighter);
    font-size: 0.95rem;
}

select, input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
    color: #a3a2a2;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(236, 65, 65, 0.2);
}

/* Processing */
.processing-container {
    text-align: center;
    padding: 2rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 2rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ff8a00);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.status-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Audio Player */
.audio-player {
    width: 100%;
    margin: 1rem 0;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
}

.audio-player::-webkit-media-controls-panel {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.audio-player::-webkit-media-controls-play-button,
.audio-player::-webkit-media-controls-mute-button {
    background-color: var(--primary);
    border-radius: 50%;
}

.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display {
    color: var(--text-lighter);
}

/* Messages */
.error-message {
    background-color: rgba(255, 77, 79, 0.1);
    color: var(--text-lighter);
    padding: 1rem;
    border-radius: 6px;
    margin: 0 auto 2rem;
    border-left: 3px solid var(--danger);
    width: 90%;
    max-width: 500px;
}

.success-message {
    background-color: rgba(29, 185, 84, 0.1);
    color: var(--text-lighter);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    border-left: 3px solid var(--success);
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(236, 65, 65, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Player */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--darker-color);
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.8rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.close-modal:hover {
    color: white;
}

.player-header {
    display: flex;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, #282828, #121212);
    color: white;
    position: relative;
}

.now-playing-cover {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #333, #555);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 2.5rem;
    color: var(--text-light);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.now-playing-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#nowPlayingTitle {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

#nowPlayingArtist {
    margin: 0;
    font-size: 1rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.time-display {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    gap: 0.5rem;
}

.player-controls {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.player-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.player-btn:active {
    transform: scale(0.98);
}

.player-btn i {
    font-size: 1rem;
}

.main-btn {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
}

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

/* 修复进度条CSS */
.progress-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 2rem 0;
    overflow: hidden;
    position: relative; /* 添加定位 */
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ff8a00);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
    position: absolute; /* 改为绝对定位 */
    top: 0;
    left: 0;
}

/* 移除重复的.progress-bar定义 */

.progress-bar {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    margin: 0.5rem 0;
}

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

.progress-handle {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0 0 2px var(--darker-color);
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress-bar:hover .progress-fill {
    height: 6px;
    margin-top: -1px;
}

.volume-control {
    width: 100px;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.volume-control.show {
    display: flex;
}

#volumeSlider {
    flex: 1;
    cursor: pointer;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.lyrics-section {
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.lyrics-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.lyrics-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s;
}

.lyrics-search input:focus {
    outline: none;
    background-color: var(--card-hover);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.lyrics-search-btn {
    padding: 0 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.lyrics-search-btn:hover {
    background-color: var(--secondary-color);
}

.lyrics-results-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.lyrics-display {
    white-space: pre-wrap;
    line-height: 0.8;
    color: var(--text-color);
    font-size: 0.95rem;
}

.lyrics-display h4 {
    margin-top: 0;
    color: white;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}

.lyrics-versions h4 {
    margin-top: 0;
    color: white;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}

.versions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.version-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.version-item:last-child {
    border-bottom: none;
}

.version-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.version-item a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    transition: color 0.2s;
    padding: 0.5rem;
    border-radius: 4px;
}

.version-item a:hover {
    color: white;
}

.version-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: white;
}

.version-artist {
    color: var(--text-light);
    font-size: 0.9rem;
}

.no-lyrics, .lyrics-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.lyrics-placeholder i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    display: block;
}

.lyrics-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.lyrics-loading i {
    animation: spin 1s linear infinite;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* Scrollbar styling */
.lyrics-results-container::-webkit-scrollbar {
    width: 6px;
}

.lyrics-results-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.lyrics-results-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.lyrics-results-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Auth Forms */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-form {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.auth-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-lighter);
    font-size: 1.5rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* User Panel */
.user-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.panel-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.panel-title a {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--primary);
    text-decoration: none;
}

.panel-title a:hover {
    text-decoration: underline;
}

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

.panel-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-item:last-child {
    border-bottom: none;
}

.panel-item-info {
    flex: 1;
}

.panel-item-title {
    font-weight: 500;
    color: var(--text-lighter);
    font-size: 0.95rem;
}

.panel-item-title small {
    color: var(--text-light);
    font-size: 0.85rem;
}

.panel-item-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.panel-item-actions {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background-color: var(--primary);
    color: white;
}

.view-btn:hover {
    background-color: var(--primary-dark);
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 90;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-btn {
    background: none;
    border: none;
    color: var(--text-lighter);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.player-btn.play-pause {
    background-color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn.play-pause:hover {
    transform: scale(1.1);
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.player-title {
    font-weight: 500;
    color: var(--text-lighter);
    font-size: 0.95rem;
}

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

.player-progress {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-time {
    color: var(--text-light);
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
}

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

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 2px;
    width: 0%;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-icon {
    color: var(--text-light);
    cursor: pointer;
}

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

.volume-slider-fill {
    height: 100%;
    background-color: var(--text-light);
    border-radius: 2px;
    width: 80%;
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    background-color: rgba(0, 0, 0, 0.3);
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.back-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.info-tooltip {
    display: inline-block;
    margin-left: 0.5rem;
    width: 18px;
    height: 18px;
    background-color: var(--gray);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: help;
    position: relative;
}

.info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 5px;
    width: 200px;
    padding: 0.5rem;
    background-color: var(--dark);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    z-index: 10;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

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

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 80%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    header {
        margin: 1.5rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-links {
        display: flex;
        gap: 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 1.5rem;
    }
    
    .info-tooltip:hover::after {
        width: 160px;
        left: 0;
        transform: none;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input, .search-type {
        flex: 1;
        width: 100%;
    }
    
    .results-grid, .search-results {
        grid-template-columns: 1fr;
    }
    
    .user-panel {
        grid-template-columns: 1fr;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .music-player {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .player-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .player-progress {
        width: 100%;
    }
    
    .player-volume {
        display: none;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .player-header {
        flex-direction: column;
        text-align: center;
        padding-bottom: 1rem;
    }
    
    .now-playing-cover {
        margin: 0 auto 1rem;
    }
    
    .player-controls {
        justify-content: center;
    }
    
    .progress-container {
        order: 0;
    }
    
    .volume-control {
        width: 80px;
    }
    
    .now-playing-cover {
        width: 100px;
        height: 100px;
    }
    
    #nowPlayingTitle {
        font-size: 1.3rem;
    }
    
    #nowPlayingArtist {
        font-size: 0.9rem;
    }
}

/* Ultra small screens (mobile-first adjustments) */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem; /* Consider using clamp() for fluid typography */
        white-space: nowrap; /* Prevent logo text wrapping */
    }
    
    .user-avatar {
        width: 32px; /* Standard touch target minimum */
        height: 32px;
        flex-shrink: 0; /* Prevent avatar shrinking in flex containers */
    }
    
    .btn {
        padding: 0.5rem 1rem; /* More compact but still tappable */
        font-size: 0.9rem; /* Better proportion for small screens */
        min-height: 40px; /* Ensure minimum touch target */
    }
    
    .track-actions {
        flex-direction: row; /* Keep horizontal by default for actions */
        flex-wrap: wrap; /* Allow wrapping if needed */
        gap: 0.5rem;
        justify-content: center; /* Center action buttons */
    }
    
    .action-btn {
        width: 36px; /* Better touch target than 32px */
        height: 36px;
        min-width: 36px; /* Prevent compression */
        flex: 0 0 auto; /* Don't grow or shrink */
        margin: 0 2px; /* Maintain spacing */
    }
    
    .nav-links {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: none; /* Hide scrollbar on Firefox */
        padding-bottom: 0.5rem;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Hide scrollbar on WebKit */
    }
    
    .nav-link {
        font-size: 0.85rem;
        white-space: nowrap;
        padding: 0.5rem 0; /* Add vertical tappable area */
    }
    
    /* Optional: Add visual feedback for scrollable nav */
    .nav-links:after {
        content: "";
        padding-right: 1px; /* Right padding for scroll indication */
    }
}