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

:root {
  --bg: #08090c;
  --panel: #0e1016;
  --panel2: #13161f;
  --border: #1c2035;
  --accent: #00e5ff;
  --green: #00ff9d;
  --red: #ff3d6b;
  --yellow: #ffd93d;
  --text: #b8c0d4;
  --dim: #3d4560;
  --dim2: #606880;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px; min-height: 100vh; overflow: hidden; }

header { height: 52px; padding: 0 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; background: var(--panel); }
.auth-container { margin-left: auto; margin-right: 12px; display: flex; align-items: center; }
.btn-google { background: rgba(0,229,255,0.05); border: 1px solid var(--border); color: var(--accent); font-family: 'Space Mono', monospace; font-size: 10px; padding: 4px 12px; border-radius: 4px; cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 8px; letter-spacing: 1px; }
.btn-google:hover { border-color: var(--accent); background: rgba(0,229,255,0.1); transform: translateY(-1px); }
.btn-google .g-icon { background: var(--accent); color: #000; width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; border-radius: 2px; font-weight: bold; font-size: 9px; }

.btn-logout { background: none; border: 1px solid var(--border); color: var(--dim2); cursor: pointer; font-size: 10px; padding: 2px 6px; border-radius: 3px; margin-left: 4px; transition: all .15s; }
.btn-logout:hover { border-color: var(--red); color: var(--red); }

.lang-btn { font-family: 'Space Mono', monospace; font-size: 10px; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--border); color: var(--dim2); background: transparent; cursor: pointer; transition: all .15s; letter-spacing: 1px; }
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }

.logo-link { text-decoration: none; }
.logo-link:hover h1 { color: #fff; text-shadow: 0 0 30px var(--accent); }

.twitter-link { font-family: 'Space Mono', monospace; font-size: 12px; text-decoration: none; color: var(--dim2); border: 1px solid var(--border); padding: 2px 10px; border-radius: 3px; transition: all .15s; }
.twitter-link:hover { border-color: var(--accent); color: var(--accent); }

header h1 { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 4px; color: var(--accent); text-shadow: 0 0 24px rgba(0,229,255,0.25); transition: color .2s; }
.badge { font-family: 'Space Mono', monospace; font-size: 10px; padding: 2px 8px; border-radius: 2px; border: 1px solid var(--border); color: var(--dim2); }
.badge.hi { border-color: var(--accent); color: var(--accent); background: rgba(0,229,255,0.06); }

.btn-buy {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 3px;
  border: 1px solid var(--green);
  color: var(--green);
  background: rgba(0, 255, 157, 0.06);
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 1px;
}
.btn-buy:hover {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.root { display: grid; grid-template-columns: 280px 1fr; height: calc(100vh - 52px); overflow: hidden; }

.sidebar { background: var(--panel); border-right: 1px solid var(--border); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sb-section { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sb-title { font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sb-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.help-btn { background: rgba(0, 229, 255, 0.1); border: 1px solid var(--border); color: var(--accent); width: 16px; height: 16px; border-radius: 50%; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-family: 'Space Mono', monospace; font-weight: bold; }
.help-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(3px); }
.modal-content { background: var(--panel2); margin: 10% auto; padding: 24px; border: 1px solid var(--border); border-radius: 8px; width: 500px; max-width: 90%; color: var(--text); position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 2px; color: var(--accent); }
.modal-close { background: none; border: none; color: var(--dim2); font-size: 16px; cursor: pointer; }
.modal-close:hover { color: var(--red); }
.modal-body { font-family: 'DM Sans', sans-serif; line-height: 1.6; font-size: 13px; max-height: 60vh; overflow-y: auto; }
.modal-body h4 { color: var(--yellow); margin: 16px 0 8px; font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; }
.modal-body p { margin-bottom: 12px; color: var(--text); }
.modal-body b { color: var(--accent); }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.drop-zone { border: 1px dashed var(--border); border-radius: 6px; padding: 7px 10px; text-align: center; cursor: pointer; position: relative; transition: all .2s; display: flex; align-items: center; gap: 8px; justify-content: center; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: rgba(0,229,255,0.03); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-zone .dz-icon { font-size: 15px; flex-shrink: 0; }
.drop-zone p { font-size: 11px; color: var(--dim2); text-align: left; line-height: 1.4; }
.drop-zone p b { color: var(--text); font-weight: 500; }

.btn { display: block; width: 100%; padding: 8px; border: none; border-radius: 4px; font-family: 'Space Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all .15s; margin-top: 7px; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #33eeff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--dim2); }
.btn-ghost:hover { border-color: var(--dim2); color: var(--text); }
.btn-green { background: var(--green); color: #000; }
.btn-green:hover { background: #33ffb5; }

.f-label { font-family: 'Space Mono', monospace; font-size: 9px; color: var(--dim2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; margin-top: 10px; }
.f-label:first-child { margin-top: 0; }
.f-row { display: flex; gap: 5px; align-items: center; }
.f-input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 3px; color: var(--text); font-family: 'Space Mono', monospace; font-size: 11px; padding: 6px 7px; outline: none; transition: border-color .2s; min-width: 0; }
.f-input:focus { border-color: var(--yellow); }
.f-sep { color: var(--dim); font-size: 11px; flex-shrink: 0; }
select.f-input option { background: #1a1d28; }

.chip-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { padding: 3px 9px; border-radius: 20px; font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: .5px; cursor: pointer; border: 1px solid var(--border); color: var(--dim2); background: transparent; transition: all .15s; white-space: nowrap; }
.chip:hover { border-color: var(--dim2); color: var(--text); }
.chip.on { background: rgba(0,229,255,0.1); border-color: var(--accent); color: var(--accent); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scard { background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 8px 10px; }
.scard .sl { font-family: 'Space Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim2); }
.scard .sv { font-family: 'Space Mono', monospace; font-size: 15px; font-weight: 700; margin-top: 3px; color: #fff; }
.scard .sv.g { color: var(--green); } .scard .sv.r { color: var(--red); } .scard .sv.y { color: var(--yellow); } .scard .sv.c { color: var(--accent); }
.scard.full { grid-column: 1/-1; }
.wr-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 5px; }
.wr-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--green), var(--accent)); transition: width .4s; }

.main { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.toolbar { height: 42px; padding: 0 20px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); background: var(--panel); flex-shrink: 0; }
.tab { padding: 4px 12px; border-radius: 3px; font-family: 'Space Mono', monospace; font-size: 10px; border: 1px solid transparent; color: var(--dim2); cursor: pointer; background: transparent; transition: all .15s; letter-spacing: .5px; }
.tab:hover { color: var(--text); border-color: var(--border); }
.tab.on { color: var(--accent); border-color: var(--accent); background: rgba(0,229,255,0.06); }
.tb-sep { width: 1px; height: 20px; background: var(--border); }
#filterInfo { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--dim2); margin-left: auto; }

.view { display: none; flex: 1; min-height: 0; overflow-y: auto; }
.view.active { display: flex; flex-direction: column; }

.plot-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; margin: 16px 20px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.plot-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.plot-title { font-family: 'Bebas Neue', sans-serif; font-size: 16px; letter-spacing: 2px; color: var(--accent); }
.plot-subtitle { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--dim2); }
.legend { margin-left: auto; display: flex; align-items: center; gap: 12px; font-family: 'Space Mono', monospace; font-size: 9px; color: var(--dim2); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-line { width: 18px; height: 2px; border-radius: 1px; }
canvas.main-canvas { flex: 1; min-height: 0; width: 100%; display: block; cursor: crosshair; }

.data-table { width: 100%; border-collapse: collapse; font-family: 'Space Mono', monospace; font-size: 10px; }
.data-table th { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: left; color: var(--dim2); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; position: sticky; top: 0; background: var(--panel2); }
.data-table td { padding: 6px 12px; border-bottom: 1px solid rgba(28,32,53,0.5); }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 9px; }
.tag.g { background: rgba(0,255,157,0.1); color: var(--green); border: 1px solid rgba(0,255,157,0.2); }
.tag.r { background: rgba(255,61,107,0.1); color: var(--red); border: 1px solid rgba(255,61,107,0.2); }

.bt-result { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 14px; margin-top: 8px; font-family: 'Space Mono', monospace; font-size: 10px; }
.bt-best { color: var(--yellow); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.bt-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(28,32,53,0.5); }
.bt-row:last-child { border: none; }
.bt-row span:first-child { color: var(--dim2); }
.bt-row span:last-child { color: var(--accent); }

#copyBtn:hover { background: rgba(0,229,255,0.22) !important; }

.sb-section.locked {
  opacity: 0.8;
  filter: grayscale(0.5);
  position: relative;
}
.sb-section.locked > *:not(.premium-overlay) {
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.5;
}

#filtersSection.locked {
  position: relative;
}
.premium-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 12, 0.6);
  padding: 20px;
  text-align: center;
}
.btn-premium {
  background: linear-gradient(135deg, #9945FF, #14F195);
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(20, 241, 149, 0.3);
}
.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 241, 149, 0.5);
}
.sol-icon {
  background: #000;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.premium-desc {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #fff;
  margin-bottom: 14px;
  text-align: center;
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 6px;
  width: 100%;
}
.premium-hint {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--text);
  margin-top: 10px;
  text-shadow: 0 1px 3px #000;
}
.premium-badge {
  background: linear-gradient(90deg, #9945FF, #14F195);
  color: #000;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
  margin-left: 5px;
  text-transform: uppercase;
}

#summaryText::-webkit-scrollbar { width: 3px; }
#summaryText::-webkit-scrollbar-thumb { background: var(--border); }
#tooltip { position: fixed; background: var(--panel2); border: 1px solid var(--border); border-radius: 5px; padding: 8px 12px; font-family: 'Space Mono', monospace; font-size: 10px; pointer-events: none; z-index: 100; display: none; line-height: 1.8; min-width: 160px; }
