@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg: #080810;
  --surface: #0f0f1a;
  --surface2: #141420;
  --surface3: #1a1a28;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.13);
  --accent: #00f5a0;
  --accent-dim: rgba(0,245,160,0.15);
  --accent-glow: rgba(0,245,160,0.4);
  --blue: #4f8fff;
  --blue-dim: rgba(79,143,255,0.15);
  --red: #ff4d6d;
  --red-dim: rgba(255,77,109,0.15);
  --yellow: #ffd166;
  --text: #e8e8f0;
  --text-muted: #666680;
  --text-dim: #9999b3;
  --radius: 10px;
  --radius-lg: 16px;
}

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

body {
  background: var(--bg);
  font-family: 'Syne', sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  position: relative;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,245,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,160,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.mac-window {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--border),
    0 40px 100px rgba(0,0,0,0.7),
    0 0 80px rgba(0,245,160,0.04);
  animation: windowIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes windowIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.title-bar {
  background: rgba(18,18,28,0.95);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.traffic-lights .light {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s;
}

.traffic-lights .light:hover { filter: brightness(1.2); }
.traffic-lights .light span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.15s;
}
.traffic-lights:hover .light span { opacity: 1; }

.red   { background: #ff5f57; box-shadow: 0 0 6px rgba(255,95,87,0.5); }
.yellow{ background: #ffbd2e; box-shadow: 0 0 6px rgba(255,189,46,0.5); }
.green { background: #28ca42; box-shadow: 0 0 6px rgba(40,202,66,0.5); }

.window-title {
  flex: 1;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
}

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

@keyframes pulse {
  0%,100% { box-shadow: 0 0 6px var(--accent-glow); }
  50%      { box-shadow: 0 0 14px var(--accent-glow), 0 0 24px var(--accent-glow); }
}

.main-content {
  display: flex;
  min-height: 680px;
}

.sidebar {
  width: 230px;
  background: var(--surface2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 28px;
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}

.logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,245,160,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 20px var(--accent-dim);
}

.sidebar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  padding: 0 22px 10px;
  text-transform: uppercase;
}

.sidebar ul {
  list-style: none;
  padding: 0 10px;
  flex: 1;
}

.sidebar li {
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.18s;
  position: relative;
  margin-bottom: 3px;
}

.sidebar li:hover {
  background: var(--surface3);
  color: var(--text);
}

.sidebar li.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0,245,160,0.2);
}

.nav-icon {
  width: 26px;
  text-align: center;
  font-size: 13px;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 22px 0;
  border-top: 1px solid var(--border);
  margin: 0 10px;
}

.version-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.panel {
  flex: 1;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.breadcrumb span { color: var(--accent); }

.panel h1 {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}

.header-meta {
  display: flex;
  gap: 10px;
  padding-top: 6px;
}

.meta-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,245,160,0.2);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px;
}

.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group.full { width: 100%; }

.input-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}

.input-group label i {
  color: var(--accent);
  font-size: 10px;
  opacity: 0.8;
}

.input-wrap {
  position: relative;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface3);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 20px rgba(0,245,160,0.1);
}

.input-wrap input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.select-wrap { position: relative; }

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 11px;
  pointer-events: none;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.divider-v {
  width: 1px;
  height: 44px;
  background: var(--border-bright);
  flex-shrink: 0;
}

.auto-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.auto-count-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auto-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.count-input {
  width: 72px;
  padding: 9px 12px;
  background: var(--surface3);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.count-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.btn {
  position: relative;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.15s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-content {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.launch-btn {
  background: var(--accent);
  color: #000;
  font-size: 14px;
  padding: 14px 30px;
  box-shadow: 0 4px 20px rgba(0,245,160,0.3);
}

.launch-btn .btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.launch-btn:hover {
  box-shadow: 0 6px 30px rgba(0,245,160,0.5);
}

.auto-btn {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(79,143,255,0.3);
  box-shadow: 0 0 20px rgba(79,143,255,0.1);
}

.auto-btn:hover {
  background: rgba(79,143,255,0.2);
  box-shadow: 0 0 28px rgba(79,143,255,0.25);
}

.stop-btn {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,77,109,0.3);
  box-shadow: 0 0 20px rgba(255,77,109,0.1);
}

.stop-btn:hover {
  background: rgba(255,77,109,0.2);
  box-shadow: 0 0 28px rgba(255,77,109,0.25);
}

.log-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--surface3);
  border-bottom: 1px solid var(--border);
}

.log-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.log-title i { color: var(--accent); }

.log-controls {
  display: flex;
  gap: 6px;
}

.log-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.dot-green  { background: #28ca42; }
.dot-yellow { background: #ffbd2e; }
.dot-red    { background: #ff5f57; }

.log-window {
  flex: 1;
  min-height: 280px;
  max-height: 320px;
  padding: 16px 20px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.8;
  background: #09090f;
}

.log-window::-webkit-scrollbar { width: 5px; }
.log-window::-webkit-scrollbar-track { background: transparent; }
.log-window::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 10px;
}

.log-line {
  display: flex;
  gap: 10px;
  animation: fadeSlide 0.2s ease both;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.log-time { color: var(--text-muted); flex-shrink: 0; }

.log-line.info    .log-msg { color: #a0c4ff; }
.log-line.success .log-msg { color: var(--accent); }
.log-line.error   .log-msg { color: var(--red); }
.log-line.warning .log-msg { color: var(--yellow); }
