@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.eot');
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.eot?#iefix') format('embedded-opentype'),
         url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff') format('woff'),
         url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', sans-serif;
}

body {
    background: linear-gradient(45deg, #222, #444);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.music-player {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.player-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-header h1 {
    margin-bottom: 15px;
    font-size: 24px;
}

.search-container {
    display: flex;
    margin-top: 10px;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 25px 0 0 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

.search-container button {
    background: #1db954;
    border: none;
    border-radius: 0 25px 25px 0;
    padding: 0 15px;
    color: white;
    cursor: pointer;
}

.now-playing {
    padding: 20px;
    display: flex;
    align-items: center;
}

.album-art {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    margin-left: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.track-info {
    flex: 1;
}

.track-info h2 {
    margin-bottom: 5px;
    font-size: 20px;
}

.track-info p {
    color: #aaa;
    margin-bottom: 15px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #1db954;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.control-button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.main-button {
    background: #1db954;
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.main-button:hover {
    background: #1ed760;
    transform: scale(1.05);
}

.playlist-section {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.playlist-section h3 {
    margin-bottom: 15px;
}

.playlist {
    list-style: none;
}

.playlist-item {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: rgba(29, 185, 84, 0.3);
}

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

.playlist-item-title {
    font-weight: bold;
    margin-bottom: 3px;
}

.playlist-item-artist {
    font-size: 12px;
    color: #aaa;
}

.playlist-item-duration {
    font-size: 12px;
    color: #aaa;
}

/* برای کارپلی و نمایش‌های بزرگ */
@media (min-width: 800px) {
    .music-player {
        max-width: 800px;
        display: flex;
        flex-wrap: wrap;
    }
    
    .player-header {
        width: 100%;
    }
    
    .now-playing {
        width: 60%;
        padding: 30px;
    }
    
    .playlist-section {
        width: 40%;
        border-top: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        max-height: none;
        height: calc(100% - 80px);
    }
    
    .controls {
        width: 100%;
    }
    
    .album-art {
        width: 150px;
        height: 150px;
    }
}

/* برای موبایل در حالت افقی */
@media (max-width: 799px) and (orientation: landscape) {
    .music-player {
        max-width: 800px;
        display: flex;
        flex-wrap: wrap;
    }
    
    .player-header {
        width: 100%;
        padding: 10px;
    }
    
    .now-playing {
        width: 60%;
        padding: 15px;
    }
    
    .playlist-section {
        width: 40%;
        border-top: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        max-height: 300px;
    }
    
    .controls {
        width: 100%;
        padding: 10px;
    }
    
    .album-art {
        width: 100px;
        height: 100px;
    }
}

/* دارک مود برای کارپلی */
@media (prefers-color-scheme: dark) {
    body {
        background: #000;
    }
    
    .music-player {
        background: rgba(20, 20, 20, 0.8);
    }
}