* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif; background:#1c1c1e; color:#fff; display:flex; flex-direction:column; min-height:100vh; overflow-x:hidden; transition: background 1s linear; }
a { text-decoration:none; color:inherit; }

#particleCanvas { position: fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; }

.top-nav { display:flex; justify-content:center; gap:30px; padding:15px 0; background: rgba(28,28,30,0.7); backdrop-filter: blur(20px) saturate(120%); position: sticky; top:0; z-index:1000; }
.top-nav a { font-weight:500; padding:5px 15px; border-radius:12px; transition: all 0.3s ease; }
.top-nav a:hover { background: rgba(255,255,255,0.1); }
.top-nav a.active { color:#007aff; font-weight:600; }

.page { display:none; flex-direction:column; padding:20px; flex:1; overflow-y:auto; opacity:0; transform:translateY(20px); transition: opacity 0.3s ease, transform 0.3s ease; }
.page.active { display:flex; opacity:1; transform:translateY(0); }

.card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:20px; }
.card { display:flex; flex-direction:column; align-items:center; cursor:pointer; transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; background: rgba(255,255,255,0.05); backdrop-filter: blur(15px) saturate(120%); border:1px solid rgba(255,255,255,0.15); border-radius:15px; overflow:hidden; position:relative; }
.card:hover { transform: scale(1.06); box-shadow: 0 15px 35px rgba(0,0,0,0.7); }
.card img { width:100%; border-radius:15px; box-shadow:0 5px 15px rgba(0,0,0,0.5); transition: transform 0.3s ease; }
.card:hover img { transform: scale(1.08); }
.card p { margin-top:8px; font-size:14px; color:#ddd; text-align:center; transition: color 0.2s ease; }
.card:hover p { color:#fff; }

.player-container { position: fixed; bottom:10px; left:50%; transform:translateX(-50%); background: rgba(255,255,255,0.1); backdrop-filter: blur(25px) saturate(150%); border:1px solid rgba(255,255,255,0.2); border-radius:20px; width:90%; max-width:500px; min-width:300px; padding:15px; display:flex; flex-direction:column; align-items:center; z-index:1000; transition: all 0.3s ease; overflow:hidden; resize: vertical; transform: translateZ(0); cursor: grab; }
.album-art img { width:100%; border-radius:12px; box-shadow:0 8px 30px rgba(0,0,0,0.6); transition: width 0.3s ease, height 0.3s ease; }
.song-info h2 { margin:5px 0; font-weight:600; font-size:16px; transition: font-size 0.3s ease; }
.song-info h3 { margin:0 0 5px; font-weight:400; font-size:14px; transition: font-size 0.3s ease; }
.controls { display:flex; gap:15px; margin:10px 0; }
.controls button { background: rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.3); border-radius:50%; width:45px; height:45px; font-size:18px; color:#fff; cursor:pointer; transition: all 0.2s ease; }
.controls button:hover { background: rgba(255,255,255,0.25); transform:scale(1.1); }
#progress { width:100%; height:6px; border-radius:10px; background: rgba(255,255,255,0.2); cursor:pointer; transition: all 0.3s ease; }
#progress::-webkit-slider-thumb { -webkit-appearance:none; height:18px; width:18px; border-radius:50%; background:#fff; cursor:pointer; box-shadow:0 0 8px rgba(255,255,255,0.7); }
#progress::-moz-range-thumb { height:18px; width:18px; border-radius:50%; background:#fff; cursor:pointer; box-shadow:0 0 8px rgba(255,255,255,0.7); }

.lyrics { margin-top:10px; font-size:13px; width:100%; text-align:center; background: rgba(255,255,255,0.05); backdrop-filter: blur(15px) saturate(120%); padding:10px; border-radius:12px; color:#ddd; white-space:pre-wrap; word-wrap:break-word; max-height:120px; overflow-y:auto; transition: all 0.3s ease; scrollbar-width: none; }
.lyrics::-webkit-scrollbar { display:none; }
.lyrics span { display:block; color:#ccc; line-height:1.5; opacity:0.6; transition: transform 0.1s ease, color 0.1s ease; transform-origin: center; }
.lyrics span.active { color:#fff; font-size:14px; opacity:1; }

.player-container.mini { height:60px; padding:5px 10px; flex-direction:row; align-items:center; cursor:pointer; }
.player-container.mini .album-art { width:50px; height:50px; flex-shrink:0; }
.player-container.mini .album-art img { width:100%; height:100%; border-radius:8px; }
.player-container.mini .song-info { display:flex; flex-direction:column; margin-left:10px; flex:1; }
.player-container.mini .controls { display:flex; gap:10px; margin:0; }
.player-container.mini #progress, .player-container.mini .lyrics { display:none; }

* { scroll-behavior:smooth; will-change: transform, opacity; }
@keyframes selectSong { 0%{transform:scale(1);box-shadow:0 5px 15px rgba(0,0,0,0.5);} 50%{transform:scale(1.08);box-shadow:0 20px 40px rgba(0,0,0,0.8);} 100%{transform:scale(1);box-shadow:0 5px 15px rgba(0,0,0,0.5);} }
.album-art img.playing { animation: pulseGlow 1.2s ease-in-out infinite; }
@keyframes pulseGlow { 0% {box-shadow:0 8px 30px rgba(0,0,0,0.6);} 50%{box-shadow:0 12px 40px rgba(0,255,255,0.6);} 100%{box-shadow:0 8px 30px rgba(0,0,0,0.6);} }

.fullscreen-album { position:fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(20px) saturate(120%); display:flex; align-items:center; justify-content:center; z-index:2000; flex-direction:column; opacity:0; pointer-events:none; transition: opacity 0.3s ease; }
.fullscreen-album.active { opacity:1; pointer-events:auto; }
.fullscreen-album img { max-width:80%; max-height:80%; border-radius:15px; box-shadow:0 15px 40px rgba(0,0,0,0.8); }
.fullscreen-album .close-btn { position:absolute; top:30px; right:30px; font-size:24px; color:#fff; cursor:pointer; }
