@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:wght@300;400;500&family=IBM+Plex+Sans:wght@300;400;500&display=swap');

:root {
  --bg:       #0a0c0f;
  --surface:  #111418;
  --surface2: #181c22;
  --border:   #1e2530;
  --accent:   #a8d832;
  --accent2:  #5b8fd8;
  --text:     #e8e4dc;
  --muted:    #6b7280;
  --mono:     'IBM Plex Mono', monospace;
  --sans:     'IBM Plex Sans', sans-serif;
  --display:  'Bebas Neue', sans-serif;
  --nav-h:    60px;
  --sidebar-w: 220px;
  --ad-w:     160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
}

/* ── Scanline texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ══════════════════════════════════════
   TOP NAV
══════════════════════════════════════ */
.top-nav {
  height: var(--nav-h);
  flex-shrink: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
  z-index: 100;
  position: relative;
}

/* subtle accent line at very top */
.top-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  opacity: 0.6;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-name {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  line-height: 1;
}

.nav-logo-sub {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.1rem;
}

.nav-spacer { flex: 1; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
}

.nav-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   BODY LAYOUT
══════════════════════════════════════ */
.body-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════════════════════
   CENTER PANEL
══════════════════════════════════════ */
.center-panel {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-width: 0;
}

/* ══════════════════════════════════════
   LEFT SIDEBAR NAV
══════════════════════════════════════ */
.tool-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-label {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.tool-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.tool-section-label {
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.75rem 1rem 0.35rem;
  opacity: 0.6;
}

.tool-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  transition: background 0.15s;
  border-left: 2px solid transparent;
  position: relative;
}

.tool-btn:hover {
  background: rgba(168,216,50,0.05);
}

.tool-btn.active {
  background: rgba(168,216,50,0.08);
  border-left-color: var(--accent);
}

.tool-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.8;
}

.tool-btn.active .tool-icon { opacity: 1; }

.tool-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }

.tool-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-btn.active .tool-name { color: var(--accent); }

.tool-desc {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-badge {
  font-family: var(--mono);
  font-size: 0.48rem;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
  display: inline-block;
  width: fit-content;
}

.tool-badge.live { background: rgba(168,216,50,0.15); color: var(--accent); }
.tool-badge.soon { background: rgba(107,114,128,0.15); color: var(--muted); }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 0.85rem 1rem;
  flex-shrink: 0;
}

.sidebar-footer-text {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
  line-height: 1.6;
  opacity: 0.6;
}

.sidebar-footer-text a {
  color: var(--accent);
  text-decoration: none;
}

/* ══════════════════════════════════════
   CONTENT AREA
══════════════════════════════════════ */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

/* ── Landing / Home Screen ── */
.home-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

/* Background grid effect */
.home-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,216,50,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,216,50,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.home-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: fadeUp 0.6s ease forwards;
}

.home-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(168,216,50,0.2));
}

.home-title {
  font-family: var(--display);
  font-size: 3rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-align: center;
  line-height: 1;
}

.home-subtitle {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-cards {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s ease 0.15s both;
}

.home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  width: 200px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.home-card:hover {
  border-color: var(--accent);
  background: rgba(168,216,50,0.05);
  transform: translateY(-2px);
}

.home-card-icon { font-size: 1.5rem; }
.home-card-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}
.home-card-desc {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.5;
}

.home-stats {
  display: flex;
  gap: 2.5rem;
  animation: fadeUp 0.6s ease 0.3s both;
}

.home-stat { text-align: center; }
.home-stat-value {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  line-height: 1;
}
.home-stat-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── Tool iframe wrapper ── */
.tool-frame-wrap {
  flex: 1;
  display: none;
  position: relative;
  overflow: hidden;
}

.tool-frame-wrap.active { display: flex; }

.tool-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg);
}

/* ── Loading overlay ── */
.frame-loader {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  transition: opacity 0.3s;
}

.frame-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
