:root{
      --bg:#040817;--shell:#071024;--panel:#0b1531;--panel2:#101e45;--line:rgba(143,168,255,.16);
      --text:#f2f6ff;--muted:#92a2cf;--muted2:#6d7ba3;--blue:#227bff;--purple:#a72cff;--red:#ff0033;--green:#26d48f;
    }
    *{box-sizing:border-box}
    html,body{height:100%}
    body{
      margin:0;overflow:hidden;color:var(--text);font-family:Inter,Segoe UI,system-ui,Arial,sans-serif;
      background:
        radial-gradient(circle at 12% 20%,rgba(34,123,255,.22),transparent 28%),
        radial-gradient(circle at 82% 16%,rgba(167,44,255,.21),transparent 28%),
        radial-gradient(circle at 75% 88%,rgba(255,0,51,.10),transparent 30%),
        linear-gradient(135deg,#020511,#071025 48%,#100d32);
    }
    .app{
      width:min(1720px,calc(100vw - 28px));height:calc(100vh - 28px);margin:14px auto;
      display:grid;grid-template-columns:270px minmax(0,1fr) 370px;border:1px solid var(--line);border-radius:30px;overflow:hidden;
      background:linear-gradient(180deg,rgba(8,18,43,.86),rgba(4,10,26,.94));box-shadow:0 34px 110px rgba(0,0,0,.45);
    }
    .sidebar{padding:24px 20px;border-right:1px solid rgba(143,168,255,.10);display:flex;flex-direction:column;background:rgba(4,10,26,.40)}
    .brand img{width:190px;max-width:100%;margin-bottom:24px}
    .nav{display:grid;gap:10px}
    .nav button{height:56px;border:1px solid transparent;border-radius:17px;background:transparent;color:#cbd8ff;display:grid;grid-template-columns:42px 1fr;align-items:center;text-align:left;padding:0 12px;font-weight:900;cursor:pointer}
    .nav button span{width:38px;height:38px;border-radius:13px;background:rgba(255,255,255,.07);display:grid;place-items:center}
    .nav button.active{background:linear-gradient(135deg,var(--blue),var(--purple));color:white;box-shadow:0 18px 38px rgba(80,72,255,.26)}
    .profile-box{margin-top:auto;border:1px solid var(--line);border-radius:20px;padding:14px;background:rgba(255,255,255,.045)}
    .profile-box strong{display:block}.profile-box p{margin:5px 0 0;color:var(--muted);font-size:.84rem}
    .admin-badge{display:inline-flex;margin-top:10px;padding:6px 10px;border-radius:999px;background:rgba(38,212,143,.12);border:1px solid rgba(38,212,143,.28);color:#9fffd4;font-size:.78rem;font-weight:900}
    .main{min-width:0;min-height:0;padding:20px;display:flex;flex-direction:column;overflow:hidden}
    .right{border-left:1px solid rgba(143,168,255,.10);padding:20px 16px;background:rgba(4,10,26,.38);display:flex;flex-direction:column;gap:14px;min-height:0}
    .topbar{height:48px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex:0 0 auto}
    .title-pill,.status-pill{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:rgba(255,255,255,.055);border-radius:999px;padding:9px 13px;font-weight:900}
    .dot{width:10px;height:10px;border-radius:999px;background:var(--green);box-shadow:0 0 18px var(--green)}
    .tab{display:none;min-height:0;flex:1;overflow:hidden}.tab.active{display:flex;flex-direction:column}
    .input,.select{width:100%;height:48px;border:1px solid var(--line);border-radius:15px;background:rgba(3,10,28,.86);color:var(--text);padding:0 14px;outline:none}
    .btn{height:48px;border:0;border-radius:15px;background:linear-gradient(135deg,var(--blue),var(--purple));color:white;font-weight:950;cursor:pointer;box-shadow:0 14px 34px rgba(70,74,255,.25)}
    .btn.secondary{background:rgba(255,255,255,.07);border:1px solid var(--line);box-shadow:none;color:#dce7ff}.btn.youtube{background:linear-gradient(135deg,#ff0000,#d9002b)}
    .btn.small{height:34px;border-radius:11px;padding:0 10px;font-size:.82rem}
    .search{display:grid;grid-template-columns:1fr 150px;gap:12px;margin:10px 0 14px}.search .input{height:58px;border-radius:19px;font-size:1rem}
    .scroll{min-height:0;overflow:auto;padding-right:4px}.scroll::-webkit-scrollbar,.queue-list::-webkit-scrollbar,.history-list::-webkit-scrollbar,.track-list::-webkit-scrollbar,.playlist-list::-webkit-scrollbar{width:8px}.scroll::-webkit-scrollbar-thumb,.queue-list::-webkit-scrollbar-thumb,.history-list::-webkit-scrollbar-thumb,.track-list::-webkit-scrollbar-thumb,.playlist-list::-webkit-scrollbar-thumb{background:rgba(155,180,255,.18);border-radius:999px}
    .hero{display:grid;grid-template-columns:330px 1fr;gap:18px;border:1px solid var(--line);border-radius:24px;padding:16px;background:radial-gradient(circle at 100% 0,rgba(167,44,255,.15),transparent 34%),rgba(255,255,255,.04);min-height:210px}
    .hero img{width:100%;height:178px;object-fit:cover;border-radius:17px;background:#020713;border:1px solid rgba(255,255,255,.07)}
    .hero h1{margin:8px 0 10px;font-size:1.55rem;line-height:1.16}.meta{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:.86rem}
    .chip{display:inline-flex;align-items:center;border:1px solid var(--line);background:rgba(255,255,255,.07);border-radius:999px;padding:7px 10px;font-size:.78rem;font-weight:900}
    .card{border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.04);padding:14px;margin-top:14px}
    .card-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.card-title h3{margin:0;font-size:1rem}.muted{color:var(--muted);font-size:.84rem}
    .options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.choice{min-height:82px;border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.045);padding:12px;cursor:pointer}.choice.active{border-color:rgba(80,145,255,.8);background:linear-gradient(135deg,rgba(34,123,255,.22),rgba(167,44,255,.13))}
    .choice strong{display:block;margin-top:5px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.dest{display:grid;grid-template-columns:1fr 135px;gap:10px}.manual-genre-wrap{display:none;margin-top:10px}.manual-genre-wrap.show{display:block}
    .download-action{display:grid;grid-template-columns:1fr 210px;gap:10px;margin-top:12px}.status{display:none;white-space:pre-wrap;margin-top:10px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.055);padding:11px;color:#dce7ff}
    .panel{border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.04);padding:14px;min-height:0;display:flex;flex-direction:column}.queue-panel{flex:1}.recent-panel{flex:1}
    .panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.panel-title h3{margin:0;font-size:1rem}
    .auto{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.78rem}.pulse{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 0 rgba(38,212,143,.7);animation:pulse 1.5s infinite}@keyframes pulse{70%{box-shadow:0 0 0 8px rgba(38,212,143,0)}}
    .queue-list,.history-list,.track-list,.playlist-list{display:grid;gap:10px;overflow:auto;min-height:0}.qitem,.hist,.track-row,.playlist-row{display:grid;grid-template-columns:60px 1fr auto;gap:10px;align-items:center;border:1px solid rgba(143,168,255,.13);border-radius:16px;padding:10px;background:rgba(255,255,255,.04)}
    .qitem img,.hist img,.track-row img{width:60px;height:46px;border-radius:12px;object-fit:cover;background:#111}.qtitle,.track-title{font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.9rem}.qmeta,.track-meta{color:var(--muted);font-size:.8rem;margin-top:3px}
    .progress{height:5px;border-radius:999px;background:rgba(255,255,255,.10);overflow:hidden;margin-top:6px}.progress i{display:block;height:100%;width:var(--p);background:linear-gradient(90deg,var(--blue),var(--purple))}
    .mini-btn{height:34px;border:1px solid var(--line);background:rgba(255,255,255,.065);color:#e7eeff;border-radius:11px;padding:0 10px;font-weight:900;cursor:pointer}
    .player-grid,.profile-grid{display:grid;grid-template-columns:1fr 380px;gap:14px;min-height:0;flex:1}.player-card{border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.04);padding:14px;min-height:0;display:flex;flex-direction:column}.audio-player{width:100%;margin:10px 0 12px;filter:invert(1) hue-rotate(180deg);opacity:.9}.youtube-box{display:none;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:#020713;margin-bottom:12px}.playlist-create{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:10px}
    .admin-card{border-color:rgba(255,196,87,.28);background:linear-gradient(135deg,rgba(255,196,87,.08),rgba(255,255,255,.035))}.admin-status{color:var(--muted);font-size:.84rem;margin-top:8px}.remote-perms{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.remote-perms label{border:1px solid var(--line);background:rgba(255,255,255,.045);border-radius:14px;padding:10px;color:#dbe7ff}.admin-only{display:none}
    .login-overlay{position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.66);backdrop-filter:blur(12px);padding:18px}.login-card{width:min(420px,94vw);border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,rgba(10,22,50,.96),rgba(4,10,26,.98));padding:22px;box-shadow:0 35px 100px rgba(0,0,0,.5)}.login-card img{width:180px;margin-bottom:16px}.login-card h2{margin:0 0 8px}.login-card p{color:var(--muted);margin:0 0 14px}.login-card .input{margin-bottom:10px}
    .mobile-bottom-nav{display:none}
    .modal-back{position:fixed;inset:0;background:rgba(0,0,0,.58);z-index:20;display:none;align-items:center;justify-content:center;padding:20px}.folder-modal{width:min(960px,96vw);height:min(720px,92vh);background:#f6f7fb;color:#172033;border-radius:12px;display:grid;grid-template-rows:auto auto 1fr auto auto;overflow:hidden;box-shadow:0 30px 90px rgba(0,0,0,.45)}.fm-title{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;background:white;border-bottom:1px solid #d8dce6}.fm-x{border:0;background:transparent;font-size:24px;cursor:pointer}.fm-toolbar{display:grid;grid-template-columns:40px 40px 1fr auto;gap:8px;padding:10px;background:#f8f9fb;border-bottom:1px solid #d8dce6}.fm-toolbar input{border:1px solid #c8ceda;border-radius:5px;padding:0 10px}.fm-toolbar button,.fm-footer button,.fm-create button{border:1px solid #b8c1d0;border-radius:5px;background:white;padding:7px 12px;cursor:pointer}.fm-pathline{display:none;padding:8px 10px;background:#fff8df;color:#5a4211;font-size:.82rem;border-bottom:1px solid #ead184}.fm-pathline.show{display:block}.fm-body{display:grid;grid-template-columns:190px 1fr;min-height:0;background:white}.fm-side{background:#f6f7fa;border-right:1px solid #e0e4ec;padding:10px;overflow:auto}.fm-side button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:9px;border-radius:5px;cursor:pointer}.fm-side button:hover{background:#eaf4ff}.fm-main{display:grid;grid-template-rows:auto auto 1fr;min-height:0}.fm-current{padding:10px;border-bottom:1px solid #e5e9f1;background:#fbfcfe}.fm-list{overflow:auto;padding:6px}.fm-row{display:grid;grid-template-columns:1fr 110px;width:100%;border:1px solid transparent;background:transparent;text-align:left;padding:8px;border-radius:4px;cursor:pointer}.fm-row:hover,.fm-row.selected{background:#eaf4ff;border-color:#79b7ff}.fm-create,.fm-footer{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px;background:#f8f9fb;border-top:1px solid #d8dce6}.fm-footer{grid-template-columns:auto 1fr auto auto;align-items:center}.fm-footer input,.fm-create input{border:1px solid #c8ceda;border-radius:5px;padding:8px}.fm-open{background:#0078d4!important;color:white!important;border-color:#0078d4!important}
    @media(max-width:760px){body{overflow:hidden}.app{width:100vw;height:100vh;margin:0;border-radius:0;grid-template-columns:1fr;grid-template-rows:1fr 70px}.sidebar,.right{display:none}.main{padding:12px 12px 82px}.mobile-bottom-nav{display:grid;position:fixed;z-index:40;left:0;right:0;bottom:0;height:70px;grid-template-columns:repeat(4,1fr);background:rgba(5,12,30,.96);border-top:1px solid var(--line)}.mobile-bottom-nav button{border:0;background:transparent;color:#c8d5ff;font-weight:850;font-size:.72rem}.mobile-bottom-nav button.active{color:white;background:rgba(34,123,255,.16)}.search,.grid2,.dest,.download-action,.playlist-create{grid-template-columns:1fr}.hero,.player-grid,.profile-grid{grid-template-columns:1fr}.hero img{height:180px}.options{grid-template-columns:1fr 1fr}.folder-modal{width:100vw;height:100vh;border-radius:0}.fm-body{grid-template-columns:1fr}.fm-side{display:none}.fm-toolbar,.fm-footer,.fm-create{grid-template-columns:1fr}}
