/* Version: 1.5 */

/* Player Container */
#psp-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#psp-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, height 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psp-container {
    width: 100%;
    max-width: 1280px;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Left: Metadata */
.psp-meta {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

/* Cover Wrapper - Dynamic Size via JS */
.psp-cover {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: width 0.3s ease, height 0.3s ease;
}

#psp-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#psp-cover-placeholder {
    color: inherit;
    opacity: 0.5;
}

.psp-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#psp-title {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

#psp-artist {
    font-size: 13px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center: Controls */
.psp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
}

#psp-play-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: inherit;
    transition: transform 0.1s, background 0.2s;
}

#psp-play-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

/* Right: Volume & Admin */
.psp-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 12px;
}

.psp-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

#psp-volume {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    -webkit-appearance: none;
    cursor: pointer;
}

.psp-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

#psp-settings-btn {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
}

#psp-settings-btn:hover {
    opacity: 1;
}

/* Admin Modal */
.psp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psp-modal-content {
    background: white;
    color: #333;
    width: 90%;
    max-width: 450px;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.psp-modal-header {
    padding: 15px 20px;
    background: #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.psp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#psp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.psp-modal-body {
    padding: 20px;
}

.psp-form-group {
    margin-bottom: 15px;
}

.psp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

.psp-checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
}
.psp-checkbox-label input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.psp-form-group input[type="text"],
.psp-form-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.psp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.psp-color-input-group {
    display: flex;
    gap: 5px;
}

.psp-color-input-group input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.psp-hex-input {
    width: 100% !important;
    padding: 6px !important;
    font-family: monospace;
    font-size: 12px !important;
}

.psp-modal-footer {
    padding: 15px 20px;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e5e7eb;
}

#psp-save-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

#psp-save-btn:hover {
    background: #1d4ed8;
}

#psp-save-status {
    color: #059669;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 640px) {
    .psp-volume-wrap { display: none; }
    .psp-title { font-size: 14px; }
    .psp-artist { font-size: 12px; }
}