@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
  --bg-dark: #0a0e1a;
  --panel-bg: rgba(18, 26, 44, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #7f00ff;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #00c6ff 100%);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(127, 0, 255, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  padding: 1.5rem;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
}

/* ── Header ──────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.logo-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.1rem, 4vw, 1.8rem);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  margin-top: 0.2rem;
}

.badge {
  flex-shrink: 0;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
}

/* ── Stats Grid ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
}

.stat-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: #fff;
}

.stat-value--cyan  { color: var(--accent-cyan); }
.stat-value--status { font-size: 1.1rem; color: #a7f3d0; margin-top: 0.25rem; }

/* ── Controls Panel ──────────────────────────── */
.controls-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.controls-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 140px;
  min-width: 120px;
}

.form-group--checkbox {
  flex: 0 1 auto;
  justify-content: flex-end;
}

label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-bottom: 0.35rem;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-cyan);
  flex-shrink: 0;
}

input[type="text"], select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="text"]:focus, select:focus {
  border-color: var(--accent-cyan);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--panel-border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Main Grid ───────────────────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--panel-border);
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
}

.panel-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.panel-tag--cyan {
  color: var(--accent-cyan);
}

pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: 10px;
  overflow: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  color: #a7f3d0;
  max-height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  word-break: break-word;
  white-space: pre-wrap;
}

/* ── Responsive breakpoints ──────────────────── */

/* Tablet */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    min-width: 0;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 0.75rem;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .controls-inputs {
    flex-direction: column;
  }

  .form-group {
    flex: 1 1 100%;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  pre {
    font-size: 0.72rem;
    max-height: 300px;
  }
}
