:root {
    --primary: #8a2be2;
    --secondary: #ff1493;
    --bg-dark: #0f0c29;
    --bg-mid: #302b63;
    --bg-light: #24243e;
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid), var(--bg-light));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.player-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.player-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

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

.player-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ff8a00, #e52e71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-btn {
    color: var(--text-main);
    font-size: 1.2rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary);
}

.now-playing {
    text-align: center;
}

.album-art {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.record-vinyl {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #111;
    border: 5px solid #222;
}

.record-vinyl::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 5px solid #000;
}

.album-art.playing {
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-note {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.song-info {
    margin-bottom: 25px;
}

.song-info h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 10px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.progress {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 10px;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.play-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 20, 147, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 20, 147, 0.5);
    color: white;
}

.playlist-section {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.playlist-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.playlist {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.playlist::-webkit-scrollbar {
    width: 5px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.playlist li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.playlist li.active {
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.4);
}

.song-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.song-year {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 20px;
    background: transparent !important;
}

/* Auth / Upload Forms */
.form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.form-container h2 {
    margin-bottom: 25px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-family: inherit;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 20, 147, 0.3);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: white;
}

.error-msg {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
}

.success-msg {
    color: #00e676;
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    margin-bottom: 10px;
}

.file-input-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-btn {
    border: 1px dashed var(--glass-border);
    padding: 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    display: block;
    text-align: center;
    color: var(--text-muted);
    transition: all 0.3s;
}

.file-input-wrapper:hover .file-btn {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
}
