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

:root {
  --bg-dark: #080a12;
  --bg-darker: #0a0d17;
  --bg-panel: #111827;
  --text-primary: #eef3ff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --cyan: #22d3ee;
  --violet: #5865f2;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #080a12, #0f1420 50%, #0a0d17);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Navigation */
.dev-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(8, 10, 18, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-link {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Container */
.dev-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
}

/* Sidebar */
.dev-sidebar {
  border-right: 1px solid var(--border-color);
  background: rgba(17, 24, 39, 0.3);
  padding: 32px 16px;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section h3 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  text-align: left;
}

.sidebar-link:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.sidebar-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.15);
  border-left: 3px solid var(--cyan);
  padding-left: 9px;
}

/* Main Content */
.dev-main {
  padding: 40px;
  overflow-y: auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

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

.stat-card {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(88, 101, 242, 0.1));
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.stat-icon {
  font-size: 32px;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--cyan);
}

.stat-change {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sections */
.section {
  margin-bottom: 40px;
}

.section h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

.trend-chart {
  height: 300px;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.trend-bar {
  flex: 1;
  background: linear-gradient(180deg, #22d3ee, #5865f2);
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.trend-bar:hover {
  opacity: 1;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.info-card {
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.4);
}

.info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card p {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.status-text.operational {
  color: var(--success);
}

/* Release Info */
.release-info {
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.release-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.release-icon {
  font-size: 48px;
}

.release-details h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.release-details p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.release-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

/* History Table */
.history-table {
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.badge-info {
  background: rgba(34, 211, 238, 0.2);
  color: var(--cyan);
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.metric-card {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.4);
}

.metric-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}

.metric-chart {
  height: 150px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 16px;
}

.metric-bar {
  flex: 1;
  background: linear-gradient(180deg, #22d3ee, #5865f2);
  border-radius: 2px 2px 0 0;
  min-height: 10px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.metric-bar:hover {
  opacity: 1;
}

.metric-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* Health Items */
.health-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.health-item {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 16px;
  align-items: center;
}

.health-name {
  font-weight: 600;
  font-size: 14px;
}

.health-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #5865f2);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.health-value {
  text-align: right;
  color: var(--text-muted);
  font-size: 13px;
}

/* API Key Box */
.api-key-box {
  display: flex;
  gap: 8px;
  padding: 16px;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 16px;
}

.api-key-box input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
}

.api-key-box input:focus {
  outline: none;
  border-color: var(--cyan);
}

.warning {
  color: var(--warning);
  font-size: 12px;
  margin-top: 8px;
}

/* Endpoints */
.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.endpoint {
  padding: 16px;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.method {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.method.get {
  background: rgba(34, 211, 238, 0.2);
  color: var(--cyan);
}

.method.post {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.endpoint-path {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-primary);
}

.endpoint p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

/* Code Block */
.code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: monospace;
  font-size: 12px;
  color: var(--cyan);
  line-height: 1.6;
}

/* Buttons */
.btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #5865f2, #22d3ee);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(88, 101, 242, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Responsive */
@media (max-width: 1024px) {
  .dev-container {
    grid-template-columns: 220px 1fr;
  }

  .dev-main {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .dev-container {
    grid-template-columns: 1fr;
  }

  .dev-sidebar {
    position: fixed;
    left: -260px;
    top: 72px;
    width: 260px;
    height: calc(100vh - 72px);
    z-index: 50;
    transition: left 0.3s ease;
  }

  .dev-main {
    padding: 24px 16px;
  }

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

  .release-item {
    grid-template-columns: 1fr;
  }

  .health-item {
    grid-template-columns: 1fr;
  }

  .api-key-box {
    flex-direction: column;
  }
}
