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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-white: rgba(255, 255, 255, 0.95);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--bg-white);
    padding: 25px 30px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.logo h1 {
    font-size: 28px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.search-container {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    display: flex;
    min-width: 300px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
}

.btn-search {
    padding: 12px 20px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    cursor: pointer;
}

.app-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    flex: 1;
}

.results-section, .player-section {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.track-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 10px;
    margin-bottom: 5px;
}

.track-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

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

.track-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-artist {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-play-track {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--bg-gradient);
    color: white;
    cursor: pointer;
    margin-left: 15px;
}

.album-art {
    width: 250px;
    height: 250px;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-control {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f7fafc;
    cursor: pointer;
}

.btn-play {
    width: 70px;
    height: 70px;
    background: var(--bg-gradient);
    color: white;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.progress-bar {
    flex: 1;
    position: relative;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
}

.progress-bar input[type="range"] {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: pointer;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

@media (max-width: 1024px) {
    .app-main {
        grid-template-columns: 1fr;
    }
}
