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

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #08080c;
    color: #fff;
    overflow-x: hidden;
    padding: 30px 0;
    zoom: 1.1; /* Phóng to 10% */
}

/* 1. BACKGROUND MOVING ANIMATION */
.background { 
    position: fixed; 
    inset: 0; 
    overflow: hidden; 
    z-index: 0; 
}

.blur { 
    position: absolute; 
    border-radius: 50%; 
    filter: blur(140px); 
    opacity: 0.8; 
}

.blur1 { 
    width: 450px; 
    height: 450px; 
    background: #2563eb; 
    top: -150px; 
    left: -100px; 
    animation: moveAurora1 12s infinite alternate ease-in-out;
}

.blur2 { 
    width: 420px; 
    height: 420px; 
    background: #7c3aed; 
    bottom: -120px; 
    right: -80px; 
    animation: moveAurora2 15s infinite alternate ease-in-out;
}

@keyframes moveAurora1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 80px) scale(1.1); }
}

@keyframes moveAurora2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, -50px) scale(1.15); }
}

/* LAYOUT MAIN WRAPPER */
.main-wrapper {
    display: flex; 
    gap: 30px; 
    width: 100%; 
    max-width: 1050px; 
    padding: 0 20px;
    justify-content: center; 
    align-items: stretch; 
    z-index: 10;
    perspective: 1000px; /* Parallax 3D */
}

/* 2. CARD PARALLAX & STAGGER FADE IN */
.container {
    flex: 1; 
    background: rgba(16, 16, 26, 0.75); 
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); 
    display: flex; 
    flex-direction: column;
    justify-content: space-between; 
    padding: 32px 28px;
    
    /* Animation Load */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    
    /* Smooth transition khi đưa chuột ra ngoài (Parallax reset) */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.profile-card { animation-delay: 0.1s; }
.music-card { animation-delay: 0.25s; background: rgba(10, 10, 15, 0.85); }

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

/* 3. FLOATING AVATAR */
.profile-card { text-align: center; }
.avatar {
    width: 125px; 
    height: 125px; 
    border-radius: 50%; 
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.15), 0 0 30px rgba(59, 130, 246, 0.6);
    margin-bottom: 15px; 
    
    /* Float animation */
    animation: float 4s ease-in-out infinite;
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.15), 0 10px 40px rgba(59, 130, 246, 0.8); }
}

.avatar:hover { 
    transform: scale(1.08) translateY(-5px); 
    animation-play-state: paused; 
}

h1 { font-size: 32px; font-weight: 700; }
.bio { margin: 6px 0 25px; color: #a3abc0; font-size: 14px; }

/* 4. LINK RIPPLE / MAGNETIC HOVER */
.links { display: flex; flex-direction: column; gap: 12px; }
.links a {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    text-decoration: none; 
    color: white; 
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04); 
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Fade load từng nút */
    opacity: 0; 
    transform: translateY(15px);
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.links a:nth-child(1) { animation-delay: 0.3s; }
.links a:nth-child(2) { animation-delay: 0.4s; }
.links a:nth-child(3) { animation-delay: 0.5s; }
.links a:nth-child(4) { animation-delay: 0.6s; }
.links a:nth-child(5) { animation-delay: 0.7s; }

.left { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.left i {
    width: 38px; 
    height: 38px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    border-radius: 12px; 
    background: rgba(255, 255, 255, 0.08); 
    font-size: 18px; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.arrow { 
    opacity: .4; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    font-size: 13px; 
}

.links a:hover { 
    transform: translateY(-4px) scale(1.02); 
    background: #2563eb; 
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5); 
    border-color: rgba(255, 255, 255, 0.2);
}

.links a:hover .left i { 
    color: white; 
    background: rgba(255, 255, 255, 0.2); 
    transform: scale(1.15) rotate(-8deg); /* Xoay & phóng to icon sinh động */
}

.links a:hover .arrow { 
    opacity: 1; 
    transform: translate(5px, -5px) scale(1.1); /* Bay chéo lên góc phải */
}

/* Màu riêng từng mạng xã hội */
.links a:nth-child(1) .left i { color: #1877F2; } /* Facebook */
.links a:nth-child(2) .left i { color: #FFD43B; } /* Codeforces */
.links a:nth-child(3) .left i { color: #ffffff; } /* Chess.com */
.links a:nth-child(4) .left i { color: #5865F2; } /* Discord */
.links a:nth-child(5) .left i { color: #ffffff; } /* TikTok */

.footer { margin-top: 20px; color: #6b7280; font-size: 12px; letter-spacing: 1px; }

/* 5. COVER ANIMATION & PLAYER TOP */
.now-playing-box { 
    background: rgba(0, 0, 0, 0.4); 
    padding: 18px; 
    border-radius: 20px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    margin-bottom: 20px; 
    transition: 0.3s; 
}

.now-playing-box:hover { 
    background: rgba(0, 0, 0, 0.6); 
    border-color: rgba(255, 255, 255, 0.1); 
}

.player-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 16px; 
    margin-bottom: 15px; 
}

.player-info { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    flex: 1; 
    min-width: 0; 
}

.player-info img { 
    width: 52px; 
    height: 52px; 
    border-radius: 10px; 
    object-fit: cover; 
    flex-shrink: 0; 
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.player-info img.fade-anim { animation: coverFade 0.4s ease-out; }

@keyframes coverFade {
    0% { opacity: 0; transform: scale(0.8); filter: blur(5px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.song-details { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.title-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.title-row h3 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verified-icon { color: #1DB954; font-size: 12px; flex-shrink: 0; }
.song-details p { color: #9ca3af; font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* SÓNG ÂM */
.equalizer { display: flex; align-items: flex-end; gap: 3px; height: 18px; flex-shrink: 0; margin: 0 4px; }
.equalizer span { width: 3px; background: #1DB954; border-radius: 3px; animation: wave 1s infinite ease-in-out; animation-play-state: paused; }
.music-card.playing .equalizer span { animation-play-state: running; }
.equalizer span:nth-child(1) { animation-delay: .1s; } 
.equalizer span:nth-child(2) { animation-delay: .3s; } 
.equalizer span:nth-child(3) { animation-delay: .5s; } 
.equalizer span:nth-child(4) { animation-delay: .2s; } 
.equalizer span:nth-child(5) { animation-delay: .4s; }

@keyframes wave { 0% { height: 3px; } 50% { height: 18px; } 100% { height: 3px; } }

/* 6. BUTTON SPRING & PLAY PULSE */
.player-controls { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.control-icon { color: #9ca3af; font-size: 15px; cursor: pointer; transition: 0.2s; }
.control-icon:hover { color: #fff; transform: scale(1.2); }
.active-green { color: #1DB954 !important; text-shadow: 0 0 10px rgba(29, 185, 84, 0.5); }

.action-btn {
    width: 36px; 
    height: 36px; 
    background: #fff; 
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    cursor: pointer; 
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.action-btn i { color: #000; font-size: 14px; transition: 0.2s; }
.action-btn:hover { transform: scale(1.15); box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3); }

/* Play Pulse Glow khi đang phát */
.music-card.playing .action-btn {
    animation: playPulse 2s infinite;
}

@keyframes playPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* 7. PROGRESS GLOW & MOVING */
.player-progress { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #9ca3af; }
.progress-bar-bg { flex: 1; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 5px; cursor: pointer; overflow: hidden; }
.progress-bar-fill { 
    height: 100%; 
    width: 0%; 
    background: linear-gradient(90deg, #fff, #e0e0e0); 
    border-radius: 5px; 
    transition: width 0.1s linear; 
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); 
}

.progress-bar-bg:hover .progress-bar-fill { 
    background: linear-gradient(90deg, #1DB954, #1ed760); 
    box-shadow: 0 0 12px #1DB954; 
}

/* 8. SMOOTH PLAYLIST TRANSITION */
.playlist-container { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    background: rgba(0, 0, 0, 0.2); 
    border-radius: 18px; 
    padding: 14px; 
    border: 1px solid rgba(255, 255, 255, 0.04); 
}

.playlist-header { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 13px; 
    color: #1DB954; 
    font-weight: 600; 
    margin-bottom: 10px; 
    padding-bottom: 8px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.playlist-list { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    max-height: 230px; 
    overflow-y: auto; 
    padding-right: 4px; 
}

.playlist-list::-webkit-scrollbar { width: 4px; }
.playlist-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.playlist-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 8px 12px; 
    border-radius: 10px; 
    cursor: pointer; 
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
    border-left: 3px solid transparent;
}

.playlist-item:hover { 
    background: rgba(255, 255, 255, 0.08); 
    transform: translateX(4px); 
}

/* Active Pulse cho item đang phát */
.playlist-item.active { 
    background: rgba(29, 185, 84, 0.15); 
    border-left: 3px solid #1DB954; 
    animation: activeGlow 2.5s infinite;
}

@keyframes activeGlow {
    0%, 100% { background: rgba(29, 185, 84, 0.1); }
    50% { background: rgba(29, 185, 84, 0.25); box-shadow: inset 0 0 15px rgba(29, 185, 84, 0.1); }
}

.track-left { display: flex; align-items: center; gap: 10px; }
.track-left img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; transition: 0.3s; }
.playlist-item:hover .track-left img { transform: scale(1.1); }
.track-info h4 { font-size: 13px; font-weight: 500; color: #fff; transition: 0.3s; }
.playlist-item.active .track-info h4 { color: #1DB954; text-shadow: 0 0 8px rgba(29, 185, 84, 0.4); }
.track-info p { font-size: 11px; color: #8f95a7; }
.playing-icon { color: #1DB954; font-size: 12px; display: none; }
.playlist-item.active .playing-icon { display: block; animation: fadeIn 0.3s ease; }

@media(max-width: 900px) { 
    .main-wrapper { flex-direction: column; align-items: center; } 
    .container { width: 100%; max-width: 480px; } 
}
