/* Player Styles */
body { overflow-y: auto; }

.player-header {
    flex: 0 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
}

/* Player Section */
.player-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row; /* Horizontal */
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    width: 100%;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    border-radius: 15px;
    margin-bottom: 20px;
}

.player-left {
    flex: 0 0 auto;
    margin-right: 15px;
}

.album-mini {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.album-mini.playing { animation: pulse-art 2s infinite; }
@keyframes pulse-art { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

.player-center {
    flex: 1;
    min-width: 0; /* Text truncation fix */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 10px;
}

.track-title { 
    font-size: 1rem; 
    font-weight: 700; 
    color: white; 
    margin-bottom: 2px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.track-artist { 
    font-size: 0.85rem; 
    color: rgba(255,255,255,0.8); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.track-album {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.player-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
}

.time-info {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-family: monospace;
    margin-bottom: 2px;
}

.player-controls { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    margin-top: 0; 
}
.btn-play-mini {
    width: 45px; height: 45px;
    border-radius: 50%;
    background: white; color: black;
    border: none; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
    transition: transform 0.1s;
}
.btn-play-mini:active { transform: scale(0.95); }

.progress-bar-container {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.1);
}
.progress-bar-fill { height: 100%; background: #00f260; width: 0%; transition: width 0.2s linear; }

/* Overlay de Play Manual (Autoplay Policy) */
.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.play-overlay.active { opacity: 1; pointer-events: auto; }

.btn-play-overlay {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #00f260;
    color: black;
    font-size: 2rem;
    border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(0, 242, 96, 0.6);
    animation: pulse 2s infinite;
    cursor: pointer;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 242, 96, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(0, 242, 96, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 242, 96, 0); }
}

/* Chat Section */
.chat-section {
    flex: 1;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    height: 50vh !important; 
}
.chat-header { padding: 10px; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.5); border-bottom: 1px solid rgba(255,255,255,0.05); flex: 0 0 auto; }
.chat-messages { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }

.chat-msg {
    max-width: 85%; padding: 8px 12px;
    border-radius: 15px; font-size: 0.9rem; line-height: 1.4;
    word-wrap: break-word; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg.others { background: rgba(255,255,255,0.1); color: white; align-self: flex-start; border-bottom-left-radius: 2px; }
.chat-msg.self { background: linear-gradient(135deg, #0575e6, #00f260); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-user-name { font-size: 0.7rem; color: rgba(255,255,255,0.6); margin-bottom: 2px; display: block; }

.chat-input-area { flex: 0 0 auto; padding: 15px; background: rgba(0,0,0,0.3); display: flex; gap: 10px; align-items: center; }
.chat-input { flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 20px; padding: 10px 15px; font-size: 0.9rem; }
.chat-input:focus { outline: none; background: rgba(255,255,255,0.15); }
.btn-send { width: 40px; height: 40px; border-radius: 50%; background: #00f260; border: none; color: #000; display: flex; align-items: center; justify-content: center; }
