/* ===== KORD ENGINE - PLAYER UI ===== */

.kord-wrap {
    max-width: 860px;
    margin: 30px auto;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
}

/* ---- PLAYER CARD ---- */
.kord-player {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.kord-cover-wrap {
    width: 180px;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    background: #0f3460;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#kord-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kord-cover-placeholder {
    font-size: 64px;
    opacity: 0.4;
}

.kord-info {
    text-align: center;
    width: 100%;
}

#kord-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e0e0e0;
}

.kord-playlist-name {
    font-size: 13px;
    color: #a0a0b0;
    margin-bottom: 12px;
}

/* ---- PROGRESS ---- */
.kord-progress-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

#kord-progress-bar {
    flex: 1;
    height: 5px;
    background: #2a2a4a;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

#kord-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e94560, #0f3460);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s linear;
    position: relative;
}

#kord-progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -4px;
    width: 13px;
    height: 13px;
    background: #e94560;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(233,69,96,0.7);
}

.kord-time {
    font-size: 11px;
    color: #888;
    min-width: 36px;
    text-align: center;
}

/* ---- CONTROLS ---- */
.kord-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.kord-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.kord-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.kord-btn.active {
    color: #e94560;
}

#kord-play-btn {
    background: #e94560;
    color: #fff;
    width: 52px;
    height: 52px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233,69,96,0.5);
}

#kord-play-btn:hover {
    background: #c73652;
    transform: scale(1.05);
}

/* ---- TRACK LIST ---- */
.kord-list-wrap {
    background: #12121f;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.kord-list-header {
    padding: 14px 20px;
    background: #1a1a2e;
    font-size: 13px;
    color: #a0a0b0;
    border-bottom: 1px solid #2a2a4a;
    display: flex;
    justify-content: space-between;
}

#kord-list {
    max-height: 420px;
    overflow-y: auto;
}

#kord-list::-webkit-scrollbar { width: 4px; }
#kord-list::-webkit-scrollbar-track { background: #12121f; }
#kord-list::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 4px; }

.kord-track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #1e1e30;
}

.kord-track-item:hover {
    background: #1e1e35;
}

.kord-track-item.active {
    background: #1e1e40;
    border-right: 3px solid #e94560;
}

.kord-track-item.active .kord-track-name {
    color: #e94560;
}

.kord-track-num {
    font-size: 12px;
    color: #555;
    min-width: 22px;
    text-align: center;
}

.kord-track-item.active .kord-track-num {
    color: #e94560;
}

.kord-track-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.kord-track-thumb-placeholder {
    width: 42px;
    height: 42px;
    background: #2a2a4a;
    border-radius: 8px;
    flex-shrink: 0;
}

.kord-track-name {
    flex: 1;
    font-size: 14px;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kord-track-play-icon {
    font-size: 11px;
    color: #444;
    opacity: 0;
    transition: opacity 0.2s;
}

.kord-track-item:hover .kord-track-play-icon {
    opacity: 1;
    color: #e94560;
}

.kord-empty {
    text-align: center;
    padding: 30px;
    color: #555;
    font-size: 14px;
}

audio#kord-audio {
    display: none;
}

/* ---- RESPONSIVE ---- */
@media (min-width: 600px) {
    .kord-player {
        flex-direction: row;
        align-items: flex-start;
    }

    .kord-info {
        text-align: right;
    }

    .kord-playlist-name {
        text-align: right;
    }
}
