@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

:root {
  --bg:          #080910;
  --surface:     #0d0e14;
  --surface2:    #12131a;
  --border:      rgba(255,255,255,.07);
  --border-soft: rgba(255,255,255,.04);
  --text:        #e8eaf0;
  --muted:       #5a5f72;
  --muted2:      #3a3f52;
  --blue:        #5865F2;
  --blue-glow:   rgba(88,101,242,.35);
  --green:       #57F287;
  --green-glow:  rgba(87,242,135,.3);
  --red:         #ED4245;
  --yellow:      #FEE75C;
  --pink:        #EB459E;
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-xl:   18px;
  --transition:  .15s cubic-bezier(.4,0,.2,1);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.4);
  --shadow:      0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; scrollbar-width: thin; scrollbar-color: #1e2030 transparent; }

body {
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(88,101,242,.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(87,242,135,.05) 0%, transparent 55%);
}

button { cursor: pointer; font-family: 'DM Sans', sans-serif; }
input, textarea, select { font-family: 'DM Sans', sans-serif; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2030; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #2a2d42; }

@keyframes ping { 0% { transform:scale(1);opacity:.5; } 100% { transform:scale(2.4);opacity:0; } }
@keyframes fadeIn { from { opacity:0;transform:translateY(6px); } to { opacity:1;transform:translateY(0); } }
@keyframes slideIn { from { opacity:0;transform:translateX(-8px); } to { opacity:1;transform:translateX(0); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes shimmer { 0% { background-position:-200% center; } 100% { background-position:200% center; } }
@keyframes glow-pulse { 0%,100% { box-shadow:0 0 6px var(--green-glow); } 50% { box-shadow:0 0 16px var(--green-glow),0 0 28px rgba(87,242,135,.12); } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-3px); } }
@keyframes gradient-shift { 0% { background-position:0% 50%; } 50% { background-position:100% 50%; } 100% { background-position:0% 50%; } }
@keyframes slide-up { from { opacity:0;transform:translateY(12px) scale(.97); } to { opacity:1;transform:translateY(0) scale(1); } }
@keyframes ripple-anim { to { transform:scale(4);opacity:0; } }
@keyframes pulse-dot { 0%,100% { box-shadow:0 0 4px var(--green); } 50% { box-shadow:0 0 12px var(--green); } }

/* LOGIN */
#login-screen {
  position:fixed; inset:0; background:var(--bg); display:flex;
  align-items:center; justify-content:center; z-index:100; overflow:hidden;
}
#login-screen::before {
  content:''; position:absolute; inset:0;
  background: radial-gradient(ellipse 60% 60% at 30% 40%,rgba(88,101,242,.12) 0%,transparent 60%),
              radial-gradient(ellipse 50% 50% at 70% 60%,rgba(87,242,135,.07) 0%,transparent 55%);
  pointer-events:none;
}
#particles-canvas { position:absolute; inset:0; pointer-events:none; z-index:0; }
.login-box {
  position:relative; z-index:1; background:rgba(13,14,20,.88);
  backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,.10); border-radius:var(--radius-xl);
  padding:40px; width:380px; box-shadow:var(--shadow-lg),0 0 0 1px rgba(88,101,242,.08) inset;
  animation:slide-up .4s cubic-bezier(.34,1.56,.64,1) both;
}
.login-box::before {
  content:''; position:absolute; top:0; left:20%; right:20%; height:1px;
  background:linear-gradient(90deg,transparent,rgba(88,101,242,.6),rgba(87,242,135,.4),transparent);
  border-radius:99px;
}
.login-logo { display:flex; align-items:center; gap:13px; margin-bottom:30px; }
.ll-icon {
  width:46px; height:46px; border-radius:14px;
  background:linear-gradient(135deg,#5865F2,#57F287); background-size:200% 200%;
  animation:gradient-shift 4s ease infinite; display:flex; align-items:center;
  justify-content:center; font-size:22px; box-shadow:0 4px 16px rgba(88,101,242,.4); flex-shrink:0;
}
.ll-name { font-size:22px; font-weight:700; letter-spacing:-.02em; }
.ll-sub  { font-size:12px; color:var(--green); margin-top:1px; font-weight:500; }
.lf { margin-bottom:16px; }
.ll { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:1.2px; margin-bottom:7px; font-weight:600; }
.li {
  width:100%; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.09);
  border-radius:var(--radius-sm); padding:11px 14px; color:var(--text); font-size:14px; outline:none;
  transition:border-color var(--transition),box-shadow var(--transition),background var(--transition);
}
.li:focus { border-color:var(--blue); background:rgba(88,101,242,.06); box-shadow:0 0 0 3px rgba(88,101,242,.15); }
.li:hover:not(:focus) { border-color:rgba(255,255,255,.16); }
.login-btn {
  width:100%; padding:12px; background:linear-gradient(135deg,var(--blue),#6c77f5);
  border:none; border-radius:var(--radius-sm); color:#fff; font-size:14px; font-weight:700;
  margin-top:8px; transition:all var(--transition); position:relative; overflow:hidden; letter-spacing:.02em;
}
.login-btn:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(88,101,242,.45); }
.login-btn:active { transform:translateY(0); }
.login-err { color:var(--red); font-size:12px; margin-top:10px; text-align:center; min-height:18px; animation:fadeIn .2s ease; }

/* LAYOUT */
#app { display:none; flex:1; }
#sidebar {
  width:214px; background:var(--surface); border-right:1px solid var(--border-soft);
  display:flex; flex-direction:column; flex-shrink:0; height:100vh; position:relative;
}
#sidebar::after {
  content:''; position:absolute; top:0; right:0; width:1px; height:100%;
  background:linear-gradient(180deg,transparent 0%,rgba(88,101,242,.2) 30%,rgba(87,242,135,.12) 70%,transparent 100%);
  pointer-events:none;
}
.logo { padding:17px 16px 15px; border-bottom:1px solid var(--border-soft); display:flex; align-items:center; gap:10px; }
.logo-icon {
  width:34px; height:34px; border-radius:10px;
  background:linear-gradient(135deg,var(--blue),var(--green)); background-size:200% 200%;
  animation:gradient-shift 5s ease infinite; display:flex; align-items:center;
  justify-content:center; font-size:16px; box-shadow:0 2px 10px rgba(88,101,242,.3); flex-shrink:0;
}
.logo-name { font-weight:700; font-size:13px; letter-spacing:-.01em; }
.logo-sub  { font-size:10px; color:var(--green); font-weight:500; }
nav { flex:1; padding:10px 7px; display:flex; flex-direction:column; gap:1px; overflow-y:auto; }
.nav-section { font-size:9px; color:var(--muted2); text-transform:uppercase; letter-spacing:1.4px; padding:12px 10px 4px; font-weight:700; }
.nav-btn {
  display:flex; align-items:center; gap:9px; width:100%; padding:8px 10px;
  border-radius:var(--radius-sm); border:none; background:transparent; color:var(--muted);
  font-size:12.5px; font-weight:400; transition:all var(--transition); text-align:left; position:relative; overflow:hidden;
}
.nav-btn::before {
  content:''; position:absolute; left:0; top:25%; bottom:25%; width:2px;
  border-radius:99px; background:var(--blue); opacity:0; transition:opacity var(--transition);
}
.nav-btn:hover { background:rgba(255,255,255,.05); color:#c5c8d8; transform:translateX(1px); }
.nav-btn.active { background:rgba(88,101,242,.14); color:#8590f7; font-weight:600; }
.nav-btn.active::before { opacity:1; }
.nav-icon { font-size:13px; width:17px; text-align:center; flex-shrink:0; }
.nav-badge { margin-left:auto; font-size:9px; font-weight:700; padding:1px 6px; border-radius:99px; background:rgba(88,101,242,.2); color:#7289da; border:1px solid rgba(88,101,242,.2); }
.sidebar-footer { padding:12px 14px; border-top:1px solid var(--border-soft); flex-shrink:0; }
.status-row { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.dot-wrap { position:relative; width:9px; height:9px; flex-shrink:0; }
.dot, .dot-ping { width:9px; height:9px; border-radius:50%; position:absolute; }
.dot-ping { animation:ping 1.6s ease-out infinite; opacity:.4; }
.status-lbl { font-size:12px; font-weight:600; }
.ctrl-btns { display:flex; gap:5px; margin-bottom:9px; }
.ctrl-btn { flex:1; padding:6px 0; border-radius:var(--radius-sm); font-size:13px; transition:all var(--transition); }
.ctrl-btn:hover { transform:translateY(-1px); filter:brightness(1.15); }
.ctrl-btn:active { transform:translateY(0); }
.logout-btn { width:100%; padding:7px; border-radius:var(--radius-sm); border:1px solid rgba(255,255,255,.07); background:transparent; color:var(--muted); font-size:11px; transition:all var(--transition); }
.logout-btn:hover { border-color:rgba(237,66,69,.4); color:var(--red); background:rgba(237,66,69,.05); }

/* MAIN */
#main { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.topbar {
  padding:13px 24px; border-bottom:1px solid var(--border-soft); display:flex; align-items:center;
  justify-content:space-between; background:rgba(8,9,16,.6); backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px); flex-shrink:0; position:relative;
}
.topbar::after {
  content:''; position:absolute; bottom:-1px; left:5%; right:5%; height:1px;
  background:linear-gradient(90deg,transparent,var(--blue-glow),transparent); pointer-events:none;
}
.topbar-title { font-size:17px; font-weight:700; letter-spacing:-.02em; }
.topbar-sub   { font-size:11px; color:var(--muted); margin-top:1px; }
.player-badge { font-size:11px; color:var(--green); background:rgba(87,242,135,.1); padding:4px 11px; border-radius:99px; border:1px solid rgba(87,242,135,.2); font-weight:600; animation:glow-pulse 3s ease-in-out infinite; }
.content { flex:1; overflow:auto; padding:20px; min-height:0; }

/* CARDS */
.tab-panel { animation:fadeIn .22s cubic-bezier(.4,0,.2,1); }
.card {
  background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:18px; transition:border-color var(--transition),box-shadow var(--transition); position:relative; overflow:hidden;
}
.card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.07),transparent);
}
.card:hover { border-color:rgba(255,255,255,.11); box-shadow:0 4px 20px rgba(0,0,0,.3); }
.card-label { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:1.2px; margin-bottom:13px; font-weight:600; }
.section-title { font-size:14px; font-weight:700; margin-bottom:14px; letter-spacing:-.01em; }

/* BUTTONS */
.btn {
  padding:7px 14px; border-radius:var(--radius-sm); font-size:12px; font-weight:600; border:none;
  transition:all var(--transition); cursor:pointer; display:inline-flex; align-items:center; gap:5px;
  white-space:nowrap; position:relative; overflow:hidden; letter-spacing:.01em;
}
.btn:active { transform:scale(.97); }
.btn:disabled { opacity:.35; cursor:not-allowed; }
.ripple { position:absolute; border-radius:50%; background:rgba(255,255,255,.22); transform:scale(0); animation:ripple-anim .5s linear; pointer-events:none; }
.btn-primary { background:linear-gradient(135deg,var(--blue),#6c77f5); color:#fff; box-shadow:0 2px 10px rgba(88,101,242,.3); }
.btn-primary:hover:not(:disabled) { box-shadow:0 4px 16px rgba(88,101,242,.45); transform:translateY(-1px); }
.btn-success { background:rgba(87,242,135,.12); color:var(--green); border:1px solid rgba(87,242,135,.2); }
.btn-success:hover:not(:disabled) { background:rgba(87,242,135,.2); box-shadow:0 2px 12px rgba(87,242,135,.2); }
.btn-danger  { background:rgba(237,66,69,.12); color:var(--red); border:1px solid rgba(237,66,69,.2); }
.btn-danger:hover:not(:disabled)  { background:rgba(237,66,69,.22); box-shadow:0 2px 12px rgba(237,66,69,.2); }
.btn-warning { background:rgba(254,231,92,.08); color:var(--yellow); border:1px solid rgba(254,231,92,.16); }
.btn-warning:hover:not(:disabled) { background:rgba(254,231,92,.18); box-shadow:0 2px 12px rgba(254,231,92,.15); }
.btn-gray    { background:rgba(255,255,255,.05); color:#9da3b8; border:1px solid rgba(255,255,255,.09); }
.btn-gray:hover:not(:disabled)    { background:rgba(255,255,255,.09); }
.btn-sm { padding:4px 10px; font-size:11px; border-radius:5px; }
.btn-xs { padding:2px 7px;  font-size:10px; border-radius:4px; }

/* DASHBOARD */
.stats-row { display:flex; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.stat-card {
  background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:16px 18px; flex:1; min-width:110px; transition:all var(--transition); position:relative; overflow:hidden; cursor:default;
}
.stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:1px; background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent); }
.stat-card:hover { border-color:rgba(255,255,255,.13); transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.35); }
.stat-lbl { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:1.2px; margin-bottom:7px; font-weight:600; }
.stat-val { font-size:26px; font-weight:700; font-family:'Space Mono',monospace; letter-spacing:-.03em; }
.stat-unit { font-size:12px; color:var(--muted); margin-left:3px; }
.stat-bar { margin-top:10px; height:3px; background:rgba(255,255,255,.06); border-radius:99px; overflow:hidden; }
.stat-fill { height:100%; border-radius:99px; transition:width .9s cubic-bezier(.4,0,.2,1); }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }
.player-row { display:flex; align-items:center; gap:9px; margin-bottom:7px; font-size:13px; animation:slideIn .15s ease; }
.online-dot { width:7px; height:7px; border-radius:50%; background:var(--green); flex-shrink:0; box-shadow:0 0 6px rgba(87,242,135,.5); }
.info-row { display:flex; justify-content:space-between; margin-bottom:7px; font-size:12px; padding:4px 0; border-bottom:1px solid var(--border-soft); }
.info-row:last-child { border-bottom:none; }
.info-key { color:var(--muted); }
.info-val { font-family:'Space Mono',monospace; font-size:11px; color:#a0a8c0; }
.chart-wrap { padding:10px 0 0; position:relative; height:80px; }
canvas.sparkline { width:100%; height:70px; }

/* CONSOLE */
.console-outer { display:flex; flex-direction:column; height:100%; }
.console-toolbar { display:flex; gap:8px; margin-bottom:8px; flex-shrink:0; }
.console-filter { flex:1; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-sm); padding:7px 12px; color:var(--text); font-size:12px; outline:none; transition:border-color var(--transition),box-shadow var(--transition); }
.console-filter:focus { border-color:rgba(88,101,242,.5); box-shadow:0 0 0 3px rgba(88,101,242,.1); }
.console-filter::placeholder { color:var(--muted2); }
.console-log { flex:1; background:#05060a; border:1px solid rgba(255,255,255,.06); border-radius:var(--radius-lg) var(--radius-lg) 0 0; padding:14px; overflow-y:auto; font-family:'Space Mono',monospace; font-size:11px; line-height:1.8; min-height:0; box-shadow:inset 0 2px 12px rgba(0,0,0,.3); }
.log-entry { display:flex; gap:7px; animation:slideIn .12s ease; padding:1px 0; border-radius:3px; transition:background .1s; }
.log-entry:hover { background:rgba(255,255,255,.025); }
.log-time  { color:#3a3f52; flex-shrink:0; }
.log-dot   { flex-shrink:0; }
.log-msg   { color:#c8ccd8; word-break:break-all; white-space:pre-wrap; }
.log-entry.hidden { display:none; }
.bottom-bar { display:flex; flex-shrink:0; }
.cmd-input { flex:1; background:#07080d; border:1px solid rgba(88,101,242,.3); border-right:none; border-top:none; border-radius:0 0 0 var(--radius-lg); padding:10px 14px; color:var(--text); font-family:'Space Mono',monospace; font-size:11px; outline:none; transition:border-color var(--transition); }
.cmd-input:focus { border-color:rgba(88,101,242,.65); }
.cmd-input::placeholder { color:var(--muted2); }
.cmd-send { padding:10px 18px; background:linear-gradient(135deg,var(--blue),#6c77f5); border:none; border-radius:0 0 var(--radius-lg) 0; color:#fff; font-size:12px; font-weight:700; flex-shrink:0; transition:all var(--transition); }
.cmd-send:hover { filter:brightness(1.1); box-shadow:-4px 0 12px rgba(88,101,242,.3); }

/* CHAT */
.chat-outer { display:flex; flex-direction:column; height:100%; }
.chat-log { flex:1; background:#05060a; border:1px solid rgba(255,255,255,.06); border-radius:var(--radius-lg) var(--radius-lg) 0 0; padding:14px; overflow-y:auto; display:flex; flex-direction:column; gap:2px; min-height:0; }
.chat-msg { display:flex; align-items:baseline; gap:7px; padding:4px 9px; border-radius:var(--radius-sm); font-size:13px; flex-wrap:wrap; animation:slideIn .15s ease; transition:background var(--transition); }
.chat-msg:hover { background:rgba(255,255,255,.04); }
.chat-msg.admin-msg { background:rgba(255,165,0,.04); border-left:2px solid rgba(255,165,0,.35); }
.msg-time { font-size:10px; color:#3a3f52; font-family:'Space Mono',monospace; flex-shrink:0; }
.msg-player { font-weight:700; flex-shrink:0; }
.msg-text { color:#c8ccd8; word-break:break-all; }
.admin-pill { font-size:9px; font-weight:700; color:#FFD700; background:rgba(255,215,0,.1); padding:1px 6px; border-radius:4px; border:1px solid rgba(255,215,0,.2); letter-spacing:.5px; }
.chat-prefix { background:#07080d; border:1px solid rgba(255,165,0,.3); border-right:none; border-top:none; border-radius:0 0 0 var(--radius-lg); padding:9px 12px; color:#FFA500; font-size:11px; font-weight:700; white-space:nowrap; font-family:'Space Mono',monospace; flex-shrink:0; }
.chat-input { flex:1; background:#07080d; border:1px solid rgba(255,165,0,.3); border-left:none; border-right:none; border-top:none; padding:9px 12px; color:var(--text); font-size:13px; outline:none; min-width:0; transition:border-color var(--transition); }
.chat-input:focus { border-color:rgba(255,165,0,.6); }
.chat-send { padding:10px 18px; background:linear-gradient(135deg,#FFA500,#FFD700); border:none; border-radius:0 0 var(--radius-lg) 0; color:#000; font-size:12px; font-weight:700; flex-shrink:0; transition:all var(--transition); }
.chat-send:hover:not(:disabled) { filter:brightness(1.1); box-shadow:-4px 0 14px rgba(255,165,0,.3); }
.chat-send:disabled { opacity:.35; cursor:not-allowed; }
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; gap:10px; color:var(--muted); text-align:center; }
.empty-icon { font-size:34px; opacity:.2; animation:float 3s ease-in-out infinite; }

/* PLAYERS */
.players-tabs { display:flex; gap:5px; margin-bottom:14px; }
.ptab { padding:6px 15px; border-radius:var(--radius-sm); font-size:12px; font-weight:600; border:none; background:rgba(255,255,255,.04); color:var(--muted); cursor:pointer; transition:all var(--transition); }
.ptab.active { background:rgba(88,101,242,.18); color:#8590f7; box-shadow:0 0 12px rgba(88,101,242,.2); }
.ptab:hover:not(.active) { background:rgba(255,255,255,.07); color:#c5c8d8; }
.player-table { width:100%; border-collapse:collapse; }
.player-table th { background:rgba(88,101,242,.15); color:#7289da; font-size:11px; text-transform:uppercase; letter-spacing:.9px; padding:9px 13px; text-align:left; font-weight:700; }
.player-table td { padding:10px 13px; font-size:13px; border-bottom:1px solid var(--border-soft); transition:background var(--transition); }
.player-table tr:hover td { background:rgba(255,255,255,.025); }
.player-table td:last-child { display:flex; gap:5px; justify-content:flex-end; }
.op-badge { font-size:10px; font-weight:700; color:var(--yellow); background:rgba(254,231,92,.08); padding:1px 7px; border-radius:4px; border:1px solid rgba(254,231,92,.18); }
.player-add-row { display:flex; gap:8px; margin-bottom:14px; }
.player-add-input { flex:1; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-sm); padding:9px 13px; color:var(--text); font-size:13px; outline:none; transition:all var(--transition); }
.player-add-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(88,101,242,.12); }
.player-add-input::placeholder { color:var(--muted2); }

/* FILES */
.file-layout { display:flex; gap:14px; height:100%; min-height:0; }
.file-sidebar { width:225px; flex-shrink:0; display:flex; flex-direction:column; gap:5px; overflow-y:auto; }
.file-item { padding:10px 13px; border-radius:var(--radius-sm); background:rgba(255,255,255,.025); border:1px solid var(--border); cursor:pointer; transition:all var(--transition); }
.file-item:hover { border-color:rgba(255,255,255,.13); background:rgba(255,255,255,.04); transform:translateX(2px); }
.file-item.active { border-color:rgba(88,101,242,.5); background:rgba(88,101,242,.1); box-shadow:0 0 12px rgba(88,101,242,.15); }
.file-item-name { font-size:12px; font-weight:600; margin-bottom:2px; }
.file-item-size { font-size:10px; color:var(--muted); }
.file-item.plugin-file .file-item-name { color:#7289da; }
.file-editor-wrap { flex:1; display:flex; flex-direction:column; min-width:0; min-height:0; }
.file-editor-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; flex-shrink:0; }
.file-editor-path { font-family:'Space Mono',monospace; font-size:11px; color:var(--muted); }
.file-textarea { flex:1; background:#05060a; border:1px solid rgba(255,255,255,.07); border-radius:var(--radius-lg); padding:16px; color:var(--green); font-family:'Space Mono',monospace; font-size:11.5px; line-height:1.85; resize:none; outline:none; width:100%; min-height:0; transition:border-color var(--transition); }
.file-textarea:focus { border-color:rgba(88,101,242,.45); }
.file-placeholder { flex:1; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:13px; }

/* WORLDS */
.world-active-banner { display:flex; align-items:center; gap:10px; background:rgba(87,242,135,.05); border:1px solid rgba(87,242,135,.18); border-radius:var(--radius-sm); padding:11px 15px; margin-bottom:18px; font-size:13px; }
.world-active-dot { width:8px; height:8px; border-radius:50%; background:var(--green); flex-shrink:0; animation:glow-pulse 2s infinite; }
.world-badge-active { font-size:10px; font-weight:700; color:var(--green); background:rgba(87,242,135,.12); border:1px solid rgba(87,242,135,.25); border-radius:4px; padding:2px 8px; letter-spacing:.04em; }
.dim-columns-header { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:6px; }
.dim-col-hdr { font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding:6px 12px; border-radius:6px; text-align:center; }
.dim-hdr-ow { color:#57F287; background:rgba(87,242,135,.07); border:1px solid rgba(87,242,135,.14); }
.dim-hdr-ne { color:#FF7043; background:rgba(255,112,67,.07); border:1px solid rgba(255,112,67,.14); }
.dim-hdr-en { color:#B39DDB; background:rgba(179,157,219,.07); border:1px solid rgba(179,157,219,.14); }
.pack-list { display:flex; flex-direction:column; gap:10px; margin-bottom:8px; }
.pack-row { border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-lg); overflow:hidden; background:rgba(255,255,255,.018); }
.pack-row-active { border-color:rgba(87,242,135,.28); background:rgba(87,242,135,.02); }
.pack-row-head { display:flex; align-items:center; justify-content:space-between; padding:11px 15px; background:rgba(255,255,255,.025); border-bottom:1px solid rgba(255,255,255,.06); gap:10px; }
.pack-name { font-size:14px; font-weight:700; color:var(--text); }
.dim-columns { display:grid; grid-template-columns:repeat(3,1fr); }
.dim-col { padding:10px; border-right:1px solid rgba(255,255,255,.04); }
.dim-col:last-child { border-right:none; }
.dim-card { background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; height:100%; box-sizing:border-box; transition:all var(--transition); }
.dim-card:hover { border-color:rgba(255,255,255,.13); }
.dim-card-active { border-color:rgba(87,242,135,.28); background:rgba(87,242,135,.05); }
.dim-card-missing { border-style:dashed; opacity:.4; display:flex; align-items:center; gap:8px; }
.dim-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.dim-card-icon  { font-size:20px; }
.dim-card-label { font-size:11px; font-weight:600; color:#b0b4ba; word-break:break-all; margin-bottom:3px; }
.dim-card-meta  { font-size:10px; color:var(--muted); }
.backup-list { display:flex; flex-direction:column; gap:6px; }
.backup-row { display:flex; align-items:center; background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 14px; gap:10px; transition:all var(--transition); }
.backup-row:hover { border-color:rgba(255,255,255,.12); transform:translateX(2px); }
.backup-icon { font-size:16px; flex-shrink:0; }
.backup-info { flex:1; min-width:0; }
.backup-name { font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.backup-meta { font-size:10px; color:var(--muted); }
.backup-actions { flex-shrink:0; }
.worldset-list { display:flex; flex-direction:column; gap:10px; margin-bottom:22px; }
.worldset-card { background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:all var(--transition); }
.worldset-card:hover { border-color:rgba(255,255,255,.11); box-shadow:0 4px 16px rgba(0,0,0,.25); }
.worldset-card-active { border-color:rgba(87,242,135,.3); background:rgba(87,242,135,.025); }
.worldset-header { display:flex; align-items:center; justify-content:space-between; padding:14px 17px; border-bottom:1px solid var(--border-soft); gap:10px; }
.worldset-name { font-size:15px; font-weight:700; letter-spacing:-.02em; }
.worldset-dims { display:grid; grid-template-columns:repeat(3,1fr); }
.worldset-dim { display:flex; align-items:center; gap:10px; padding:13px 17px; border-right:1px solid var(--border-soft); }
.worldset-dim:last-child { border-right:none; }
.worldset-dim-missing { opacity:.4; }
.worldset-dim-icon  { font-size:20px; flex-shrink:0; }
.worldset-dim-info  { display:flex; flex-direction:column; gap:2px; min-width:0; }
.worldset-dim-label { font-size:12px; font-weight:600; color:#b0b4ba; }
.worldset-dim-meta  { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* DIFF */
.diff-badge    { font-size:10px; font-weight:700; border-radius:4px; padding:2px 8px; letter-spacing:.04em; text-transform:uppercase; }
.diff-peaceful { color:#57F287; background:rgba(87,242,135,.12); border:1px solid rgba(87,242,135,.25); }
.diff-easy     { color:#5865F2; background:rgba(88,101,242,.12); border:1px solid rgba(88,101,242,.25); }
.diff-normal   { color:#FEE75C; background:rgba(254,231,92,.12); border:1px solid rgba(254,231,92,.25); }
.diff-hard     { color:#ED4245; background:rgba(237,66,69,.12);  border:1px solid rgba(237,66,69,.25); }

/* SCHEDULER */
.task-list { display:flex; flex-direction:column; gap:8px; margin-bottom:20px; }
.task-row { display:flex; align-items:center; background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-lg); padding:13px 15px; gap:12px; transition:all var(--transition); }
.task-row:hover { border-color:rgba(255,255,255,.11); transform:translateX(2px); box-shadow:0 2px 12px rgba(0,0,0,.2); }
.task-row.disabled-task { opacity:.45; }
.task-icon { font-size:20px; flex-shrink:0; }
.task-info { flex:1; min-width:0; }
.task-name { font-size:13px; font-weight:600; margin-bottom:2px; }
.task-meta { font-size:11px; color:var(--muted); }
.task-actions { display:flex; gap:5px; flex-shrink:0; }
.new-task-form { background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-lg); padding:18px; }
.form-grid  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-field { display:flex; flex-direction:column; gap:5px; }
.form-label { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.9px; font-weight:600; }
.form-input, .form-select { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-sm); padding:9px 12px; color:var(--text); font-size:13px; outline:none; width:100%; transition:all var(--transition); }
.form-input:focus, .form-select:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(88,101,242,.12); }
.form-select option { background:#0f1018; }

/* SETTINGS */
.settings-section { margin-bottom:22px; }
.settings-label { font-size:13px; font-weight:700; margin-bottom:13px; display:flex; align-items:center; gap:8px; letter-spacing:-.01em; }
.toggle-row { display:flex; align-items:center; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--border-soft); transition:all var(--transition); }
.toggle-row:last-child { border-bottom:none; }
.toggle-row:hover { padding-left:4px; }
.toggle-info .toggle-title { font-size:13px; font-weight:500; }
.toggle-info .toggle-desc  { font-size:11px; color:var(--muted); margin-top:2px; }
.toggle { position:relative; width:38px; height:21px; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; position:absolute; }
.toggle-slider { position:absolute; inset:0; background:#1e2030; border-radius:99px; cursor:pointer; transition:background .22s; }
.toggle-slider:before { content:''; position:absolute; height:15px; width:15px; left:3px; top:3px; background:#6b7280; border-radius:50%; transition:transform .22s,background .22s,box-shadow .22s; }
.toggle input:checked + .toggle-slider { background:rgba(87,242,135,.2); }
.toggle input:checked + .toggle-slider:before { transform:translateX(17px); background:var(--green); box-shadow:0 0 8px rgba(87,242,135,.4); }
.full-input { width:100%; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-sm); padding:10px 13px; color:var(--text); font-size:13px; outline:none; transition:all var(--transition); }
.full-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(88,101,242,.12); }
.full-input::placeholder { color:var(--muted2); }

/* AUDIT */
.audit-table { width:100%; border-collapse:collapse; }
.audit-table th { background:rgba(88,101,242,.14); color:#7289da; font-size:11px; text-transform:uppercase; padding:9px 13px; text-align:left; font-weight:700; letter-spacing:.7px; }
.audit-table td { padding:9px 13px; font-size:12px; border-bottom:1px solid var(--border-soft); transition:background var(--transition); }
.audit-table tr:hover td { background:rgba(255,255,255,.025); }
.audit-action { font-family:'Space Mono',monospace; font-size:11px; color:#7289da; background:rgba(88,101,242,.1); padding:2px 7px; border-radius:4px; }

/* PLUGINS */
.plugins-toolbar { display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.search-input { flex:1; min-width:140px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-sm); padding:8px 12px; color:var(--text); font-size:12.5px; outline:none; transition:all var(--transition); }
.search-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(88,101,242,.1); }
.search-input::placeholder { color:var(--muted2); }
.plugin-list { display:flex; flex-direction:column; gap:7px; }
.plugin-row { display:flex; align-items:center; background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:var(--radius-lg); padding:11px 14px; gap:10px; transition:all var(--transition); }
.plugin-row:hover { border-color:rgba(255,255,255,.12); transform:translateX(2px); box-shadow:0 2px 10px rgba(0,0,0,.2); }
.plugin-row.off-row { opacity:.5; }
.p-icon { width:34px; height:34px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.p-icon.on  { background:rgba(87,242,135,.1); }
.p-icon.off { background:rgba(237,66,69,.07); }
.p-info { flex:1; min-width:0; }
.p-name { font-weight:600; font-size:13px; margin-bottom:2px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.p-meta { font-size:11px; color:var(--muted); }
.p-pill  { font-size:10px; font-weight:700; padding:1px 7px; border-radius:99px; }
.pill-on  { background:rgba(87,242,135,.12); color:var(--green); border:1px solid rgba(87,242,135,.2); }
.pill-off { background:rgba(237,66,69,.1);   color:var(--red);   border:1px solid rgba(237,66,69,.18); }
.p-actions { display:flex; gap:5px; flex-shrink:0; flex-wrap:wrap; justify-content:flex-end; }

/* MODAL */
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.75); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; z-index:200; animation:fadeIn .18s ease; }
.modal { background:#10111a; border:1px solid rgba(255,255,255,.12); border-radius:var(--radius-xl); padding:26px; width:470px; max-width:94vw; max-height:90vh; overflow-y:auto; animation:slide-up .25s cubic-bezier(.34,1.56,.64,1); box-shadow:var(--shadow-lg); position:relative; }
.modal::before { content:''; position:absolute; top:0; left:20%; right:20%; height:1px; background:linear-gradient(90deg,transparent,rgba(88,101,242,.5),transparent); }
.modal-title { font-size:16px; font-weight:700; margin-bottom:5px; letter-spacing:-.02em; }
.modal-sub   { font-size:13px; color:var(--muted); margin-bottom:18px; }
.modal-footer { display:flex; gap:8px; justify-content:flex-end; margin-top:18px; }
.upload-zone { border:2px dashed rgba(88,101,242,.3); border-radius:var(--radius-lg); padding:28px; text-align:center; cursor:pointer; transition:all .22s; background:rgba(88,101,242,.02); }
.upload-zone:hover, .upload-zone.drag-on { border-color:var(--blue); background:rgba(88,101,242,.07); box-shadow:0 0 20px rgba(88,101,242,.15); }
.upload-hint { font-size:13px; color:var(--muted); margin-top:6px; }
.upload-hint strong { color:var(--blue); }
.upload-ok   { font-size:12px; color:var(--green); margin-top:7px; font-weight:600; display:none; }
.note-warn   { margin-top:10px; font-size:11px; color:var(--yellow); background:rgba(254,231,92,.05); border:1px solid rgba(254,231,92,.13); border-radius:var(--radius-sm); padding:8px 11px; }

/* TOAST */
#toasts { position:fixed; bottom:20px; right:20px; display:flex; flex-direction:column; gap:8px; z-index:999; pointer-events:none; }
.toast { padding:10px 15px; border-radius:var(--radius-lg); font-size:13px; font-weight:500; opacity:0; transform:translateY(10px) scale(.97); transition:all .25s cubic-bezier(.34,1.3,.64,1); max-width:330px; display:flex; align-items:center; gap:9px; box-shadow:0 6px 24px rgba(0,0,0,.5); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.toast.show { opacity:1; transform:translateY(0) scale(1); }
.t-ok   { background:rgba(87,242,135,.1);  border:1px solid rgba(87,242,135,.25); color:var(--green); }
.t-err  { background:rgba(237,66,69,.1);   border:1px solid rgba(237,66,69,.25);  color:var(--red); }
.t-warn { background:rgba(254,231,92,.08); border:1px solid rgba(254,231,92,.2);  color:var(--yellow); }
.t-info { background:rgba(88,101,242,.1);  border:1px solid rgba(88,101,242,.25); color:#8590f7; }

/* MOBILE */
/* Cache la bottom nav sur desktop */
#mobile-nav { display:none !important; }

@media(max-width:768px) {

  /* ══════════════════════════════════════════════════════════
     RÈGLE NUCLÉAIRE — rien ne déborde, jamais, sur aucun écran
  ══════════════════════════════════════════════════════════ */
  html, body {
    overflow-x:hidden !important;
    max-width:100vw !important;
    width:100% !important;
  }
  * {
    max-width:100% !important;
    box-sizing:border-box !important;
  }
  /* Exception : les éléments qui ont besoin de scroller en X */
  .player-table-wrap,
  .audit-table-wrap,
  .console-log,
  #pc-list table,
  .file-editor-wrap {
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }
  /* Les tables à l'intérieur de ces wrappers peuvent être larges */
  .player-table-wrap *,
  .audit-table-wrap *,
  #pc-list table *,
  .console-log * {
    max-width:none !important;
  }

  /* ── LAYOUT ─────────────────────────────────────────────── */
  body   { flex-direction:column; overflow-y:auto; height:auto; min-height:100vh; }
  #sidebar { display:none !important; }
  #app   { flex-direction:column; width:100%; }
  #main  { width:100%; }
  .content { padding:10px; padding-bottom:75px; height:auto !important; }

  /* ── BOTTOM NAV ──────────────────────────────────────────── */
  #mobile-nav {
    position:fixed; bottom:0; left:0; right:0; z-index:100;
    background:rgba(8,9,16,.95);
    backdrop-filter:blur(16px);
    border-top:1px solid rgba(255,255,255,.08);
    display:flex; overflow-x:auto;
    padding:4px 0 max(4px, env(safe-area-inset-bottom));
    scrollbar-width:none;
  }
  #mobile-nav::-webkit-scrollbar { display:none; }
  .mob-btn {
    flex:0 0 auto; display:flex; flex-direction:column;
    align-items:center; gap:2px; padding:5px 10px;
    border:none; background:transparent; color:#5a5f72;
    font-size:9px; font-weight:600; cursor:pointer;
    white-space:nowrap; min-width:52px;
  }
  .mob-btn .mob-icon { font-size:17px; line-height:1; }
  .mob-btn.active    { color:#5865F2; }

  /* ── FLEX/GRID → COLONNE ─────────────────────────────────── */
  .stats-row,
  .plugin-row,
  .task-row,
  .player-add-row,
  .pack-row-head,
  .plugins-toolbar,
  .modal-footer,
  .file-layout { flex-direction:column !important; }

  .grid-2, .grid-3,
  .dim-columns, .dim-columns-header,
  .worldset-dims { grid-template-columns:1fr !important; }

  /* ── TEXTE ───────────────────────────────────────────────── */
  .p-name, .p-meta, .pack-name, .backup-name {
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  /* ── BOUTONS ─────────────────────────────────────────────── */
  .p-actions, .task-actions, .backup-actions {
    width:100% !important; display:flex !important;
    flex-wrap:wrap !important; gap:5px !important;
    justify-content:stretch !important;
  }
  .p-actions .btn, .task-actions .btn, .backup-actions .btn {
    flex:1 !important; justify-content:center !important;
    min-width:0 !important;
  }
  .pack-row-head > div:last-child {
    display:flex !important; flex-wrap:wrap !important;
    gap:4px !important; width:100% !important;
  }
  .pack-row-head .btn {
    flex:1 !important; text-align:center !important;
    justify-content:center !important; min-width:0 !important;
  }

  /* ── MODAL ───────────────────────────────────────────────── */
  .modal { width:92vw !important; max-width:92vw !important; padding:14px !important; }

  /* ── TOPBAR ──────────────────────────────────────────────── */
  .topbar { padding:8px 12px; flex-wrap:wrap; position:sticky; top:0; z-index:40; }
  .topbar-title { font-size:14px; }
  .topbar-sub   { font-size:9px; }
}

/* ── PIOCHE HOLOGRAPHIQUE DRAWER ──────────────────────────── */
@keyframes mob-holo-pulse {
  0%,100% { box-shadow:0 0 14px rgba(88,101,242,.3),inset 0 0 10px rgba(88,101,242,.1); }
  50%      { box-shadow:0 0 22px rgba(88,101,242,.6),inset 0 0 16px rgba(88,101,242,.2); }
}
#mob-holo-icon { animation:mob-holo-pulse 2.5s ease-in-out infinite; }

/* ── BOUTON HAMBURGER ─────────────────────────────────────── */
#mob-menu-btn:active { transform:scale(.93); background:rgba(88,101,242,.22) !important; }
