@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 40px 24px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============ מסך התחברות מעוצב ============ */
.login-screen {
    max-width: 500px;
    margin: 80px auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

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

.login-screen h1 {
    font-size: 42px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.login-screen h3 {
    color: #666;
    font-weight: 400;
    margin-bottom: 32px;
}

.login-form input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
    letter-spacing: 0.5px;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-form button {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.user-list {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.user-list h4 {
    color: #888;
    font-weight: 500;
    margin-bottom: 16px;
}

#existingUsers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.user-btn {
    padding: 8px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* ============ נגן ראשי ============ */
#playerScreen {
    animation: fadeIn 0.5s ease;
}

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

/* Header מעוצב */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 16px;
}

.header h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #fff 0%, #a0aec0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 40px;
    backdrop-filter: blur(10px);
}

#currentUserDisplay {
    color: white;
    font-weight: 500;
}

.logout-btn {
    background: rgba(229, 62, 62, 0.8);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #e53e3e;
    transform: translateY(-1px);
}

/* סטטוס בר */
.status-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

#saveStatus {
    color: #a0aec0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-bar button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-bar button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* אזור הוספת שיר */
.add-section {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.add-section input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    font-family: inherit;
}

.add-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.add-section button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

#player {
    display: none;
}

/* בקרת נגן מעוצבת */
.player-controls {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.now-playing {
    text-align: center;
    margin-bottom: 24px;
}

.now-playing span:first-child {
    font-size: 22px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 6px;
}

.now-playing span:last-child {
    color: #a0aec0;
    font-size: 15px;
}

/* Progress Bar מעוצב */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.progress-bar span {
    color: white;
    font-size: 13px;
    font-weight: 500;
    min-width: 45px;
}

.progress-bar input {
    flex: 1;
    height: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-appearance: none;
}

.progress-bar input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-bar input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* כפתורי שליטה */
.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.buttons button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 26px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buttons button:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.5);
}

#repeatBtn.active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-control span {
    color: white;
    font-size: 18px;
}

.volume-control input {
    flex: 1;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-appearance: none;
}

.volume-control input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

/* רשימת השמעה מעוצבת */
.playlist-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
}

.playlist-section h3 {
    display: inline-block;
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

#playlistCount {
    font-size: 14px;
    font-weight: 400;
    color: #a0aec0;
}

.clear-btn {
    float: right;
    background: rgba(229, 62, 62, 0.8);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #e53e3e;
    transform: translateY(-1px);
}

#playlist {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
    margin-top: 20px;
}

#playlist::-webkit-scrollbar {
    width: 6px;
}

#playlist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

#playlist li {
    padding: 16px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#playlist li:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
}

#playlist li.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-left: 4px solid #667eea;
}

.song-info {
    flex: 1;
}

.song-title {
    font-weight: 600;
    color: white;
    display: block;
    margin-bottom: 4px;
}

.song-artist {
    font-size: 13px;
    color: #a0aec0;
}

.delete-song {
    background: rgba(229, 62, 62, 0.8);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.delete-song:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

/* רספונסיביות */
@media (max-width: 768px) {
    body {
        padding: 20px 16px;
    }
    
    .login-screen {
        margin: 40px auto;
        padding: 32px 24px;
    }
    
    .login-screen h1 {
        font-size: 32px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .buttons button {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
    
    .now-playing span:first-child {
        font-size: 18px;
    }
    
    .player-controls {
        padding: 20px;
    }
    
    .playlist-section {
        padding: 18px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .player-controls {
        padding: 32px;
    }
}