:root {
  --bg-main: #0a0a0c;
  --bg-card: #121216;
  --bg-card-hover: #191920;
  --bg-input: #1b1b22;
  --border-subtle: #262632;
  --border-focus: #e50914;
  --text-primary: #ffffff;
  --text-secondary: #9da0aa;
  --text-muted: #626470;
  --brand-red: #e50914;
  --brand-red-hover: #f40612;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(229, 9, 20, 0.35);
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 40%);
}

/* Header */
.app-header {
  background: rgba(18, 18, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-red), #990000);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-title .highlight {
  color: var(--brand-red);
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(229, 9, 20, 0.15);
  color: var(--brand-red);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(229, 9, 20, 0.3);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-green);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Layout */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.view-section {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.35);
}

.btn-primary:hover {
  background: var(--brand-red-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: #404050;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.7rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.95rem;
}

.btn-danger {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.12) !important;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-icon:hover {
  color: var(--text-primary);
}

/* Login Screen */
.login-wrapper {
  min-height: calc(80vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-red), #ff4d5a);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(229, 9, 20, 0.12);
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(229, 9, 20, 0.25);
}

.login-header h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-group label .req {
  color: var(--brand-red);
}

.input-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.field-action {
  position: absolute;
  right: 14px;
  padding: 4px;
}

.input-field-wrap input,
.input-group input[type="text"],
.input-group input[type="url"],
.input-group input[type="password"] {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.18s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.login-footer {
  margin-top: 24px;
  text-align: center;
}

.security-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Alerts & Toast */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1e24;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.25s ease-out;
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-purple { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.icon-green { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
.icon-blue { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.icon-red { background: rgba(229, 9, 20, 0.12); color: var(--brand-red); }

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--brand-red);
  background: rgba(229, 9, 20, 0.1);
}

.tab-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 2px 7px;
  border-radius: 999px;
}

.tab-btn.active .tab-badge {
  background: var(--brand-red);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Campaigns List */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title-row h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.ad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ad-card:hover {
  transform: translateY(-2px);
  border-color: #3b3b4a;
}

/* 16:9 Banner Container */
.ad-banner-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #181820;
  position: relative;
  overflow: hidden;
}

.ad-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pill-active {
  background: rgba(16, 185, 129, 0.88);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.pill-paused {
  background: rgba(100, 100, 115, 0.88);
  color: #e2e2e8;
}

.ad-aspect-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ad-card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ad-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  color: #fff;
}

.ad-target-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  margin-bottom: 14px;
}

.ad-target-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.ad-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.ad-stat-item {
  text-align: center;
}

.ad-stat-num {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
}

.ad-stat-title {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.ad-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
}

.empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-state h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 20px;
}

/* Create Ad Form */
.create-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  max-width: 860px;
  margin: 0 auto;
}

.section-header-box {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 18px;
}

.section-header-box h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-header-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.poster-drop-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.poster-drop-zone:hover,
.poster-drop-zone.drag-active {
  border-color: var(--brand-red);
  background: rgba(229, 9, 20, 0.04);
}

.file-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* Format & Aspect Ratio Toggle Group */
.format-toggle-group {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.format-toggle-btn {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.format-toggle-btn:hover {
  border-color: #555566;
  color: #ffffff;
}

.format-toggle-btn.active {
  background: rgba(229, 9, 20, 0.12);
  border-color: var(--brand-red);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.25);
}

/* 16:9 Aspect Frame */
.aspect-16-9-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  background: #131318;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

/* 9:16 Aspect Frame (Shorts & Vertical) */
.aspect-9-16-frame {
  width: 240px;
  max-width: 85%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  background: #131318;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.live-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drop-prompt {
  text-align: center;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.upload-cloud-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.1);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.drop-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.aspect-ratio-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ddd;
}

.preview-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.live-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.badge-16-9 {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.or-separator {
  display: flex;
  align-items: center;
  margin: 14px 0 10px;
  text-align: center;
}

.or-separator::before,
.or-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.or-separator span {
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Toggle Switch */
.form-options {
  align-items: center;
  background: var(--bg-input);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-control input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: #2a2a34;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle-control input:checked + .toggle-slider {
  background: var(--accent-green);
}

.toggle-control input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.placement-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

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

.select-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

/* API Guide Card */
.api-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  max-width: 860px;
  margin: 0 auto;
}

.api-endpoint-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.endpoint-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.http-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.http-badge.get {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.security-badge {
  font-size: 0.72rem;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.endpoint-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.code-box {
  background: #08080a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #111116;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.code-box pre {
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    padding: 12px 16px;
  }

  .main-content {
    padding: 16px 14px 40px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .create-card,
  .api-guide-card {
    padding: 20px 16px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .placement-select-wrap {
    width: 100%;
    justify-content: space-between;
  }

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