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

:root {
  --brand-blue: #0069FF;
  --brand-blue-dark: #0050c9;
  --bg-main: #FFFFFF;
  --bg-section: #F6F8FA;
  --bg-card: #FFFFFF;
  --border-default: #E5E8EB;
  --border-strong: #C4CDD5;
  --text-primary: #0B0F19;
  --text-secondary: #637381;
  --text-muted: #919EAB;
  --accent-blue: #0069FF;
  --accent-cyan: #0069FF;
  --accent-purple: #7C3AED;
  --accent-emerald: #00875A;
  --accent-amber: #B54708;
  --accent-rose: #C4290D;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --transition: all 0.2s ease;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: #FFFFFF;
  pointer-events: none;
}

.page-view {
  display: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.page-view.active {
  display: block;
  opacity: 1;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-default);
  border-radius: 0;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  display: none;
}

.logo-area h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-area h1 span {
  color: var(--brand-blue);
  font-weight: 800;
}

.main-nav-links {
  display: flex;
  gap: 16px;
  margin-left: 32px;
}

.nav-link-btn, .nav-switch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 12px;
  height: 64px;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link-btn svg, .nav-switch-btn svg {
  display: none;
}

.nav-link-btn:hover, .nav-switch-btn:hover {
  color: var(--text-primary);
}

.nav-link-btn.active, .nav-switch-btn.active {
  color: var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  font-weight: 600;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-user { display: none; }
.auth-guest { display: flex; align-items: center; gap: 8px; }

.guest-dot {
  width: 8px;
  height: 8px;
  background-color: var(--text-muted);
  border-radius: 50%;
}

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

.login-btn-link {
  text-decoration: none;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse-emerald 2s infinite;
}

/* Dashboard */
.dashboard-wrapper {
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.glass-panel {
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

/* Buttons */
.glow-button, .btn-md {
  background: var(--brand-blue);
  border: none;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.glow-button:hover, .btn-md:hover {
  background: var(--brand-blue-dark);
  transform: none;
}

.btn-glow {
  display: none;
}

.btn-secondary, .btn-outline, .futuristic-btn-sec, .futuristic-btn-out {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover, .btn-outline:hover, .futuristic-btn-sec:hover, .futuristic-btn-out:hover {
  background: var(--bg-section);
  color: var(--text-primary);
}

.futuristic-btn {
  background: var(--brand-blue);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.futuristic-btn:hover {
  background: var(--brand-blue-dark);
}

.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(11, 15, 25, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.1);
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

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

/* Tables */
.table-responsive-container {
  overflow-x: auto;
}

.data-table, .logs-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td, .logs-table th, .logs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
  font-size: 0.9rem;
}

.data-table th, .logs-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-section);
}

.table-empty, .list-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-style: italic;
}

/* Logs specific */
.log-time { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.8rem; }
.log-id { font-weight: 500; }
.log-node { color: var(--brand-blue); }
.logs-container { max-height: 400px; overflow-y: auto; }

/* Status Pills & Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active, .badge-success { background: #E3FCEF; color: var(--accent-emerald); }
.status-idle, .badge-pending { background: #E8ECEE; color: var(--text-secondary); }
.status-busy { background: #E6F0FF; color: var(--brand-blue); }
.status-error, .badge-fail { background: #FFEBE6; color: var(--accent-rose); }
.status-warning { background: #FFFAE6; color: var(--accent-amber); }

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-cyan, .badge-blue { background: #E6F0FF; color: var(--brand-blue); }
.badge-purple { background: #F4F0FF; color: var(--accent-purple); }
.badge-emerald { background: #E3FCEF; color: var(--accent-emerald); }

.node-count-badge, .panel-badge {
  background: var(--bg-section);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  border: 1px solid var(--border-default);
}

/* Typography Colors */
.text-cyan, .text-blue { color: var(--brand-blue); }
.text-emerald { color: var(--accent-emerald); }
.text-purple { color: var(--accent-purple); }
.text-amber { color: var(--accent-amber); }
.text-rose { color: var(--accent-rose); }

/* Value Highlights */
.value-highlight { font-weight: 700; }
.value-cyan, .value-blue { color: var(--brand-blue); }
.value-amber { color: var(--accent-amber); }
.value-purple { color: var(--accent-purple); }
.value-emerald { color: var(--accent-emerald); }

/* Boxes and Cards accents */
.box-cyan, .box-blue { border-left: 4px solid var(--brand-blue); background: var(--bg-card); }
.box-amber { border-left: 4px solid var(--accent-amber); background: var(--bg-card); }
.box-purple { border-left: 4px solid var(--accent-purple); background: var(--bg-card); }
.box-emerald { border-left: 4px solid var(--accent-emerald); background: var(--bg-card); }

.card-accent-cyan, .card-accent-blue { border-top: 3px solid var(--brand-blue); }
.card-accent-amber { border-top: 3px solid var(--accent-amber); }
.card-accent-purple { border-top: 3px solid var(--accent-purple); }
.card-accent-emerald { border-top: 3px solid var(--accent-emerald); }

/* Metrics */
.metric-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section);
}

.icon-cyan, .icon-blue { color: var(--brand-blue); }
.icon-purple { color: var(--accent-purple); }
.icon-emerald { color: var(--accent-emerald); }
.icon-amber { color: var(--accent-amber); }
.icon-rose { color: var(--accent-rose); }

.metric-body { flex: 1; display: flex; flex-direction: column; }
.metric-label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.metric-value { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); margin: 0; letter-spacing: -0.5px; line-height: 1.1; }
.metric-subtext { font-size: 0.76rem; color: var(--text-muted); margin-top: 6px; }

/* Single Row 4-Column Cards Strip */
.metrics-grid, .overview-grid, .admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .metrics-grid, .overview-grid, .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .metrics-grid, .overview-grid, .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

.overview-section, .admin-section {
  padding: 32px;
}

.section-title-bar, .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-bar h2, .panel-header h2, .panel-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.section-hint, .panel-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.panel-tag {
  background: var(--bg-section);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.cyan-glow, .purple-glow {
  /* removed glow, standard background */
  background: var(--bg-section);
}

/* Profile / Hero / User Panel */
.profile-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.profile-hero-backdrop {
  height: 120px;
  background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-blue));
}

.profile-hero-content {
  padding: 24px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: -64px;
}

.profile-avatar-wrapper {
  position: relative;
}

.profile-avatar-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  background: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--brand-blue);
  background: #E6F0FF;
}

.avatar-status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--accent-emerald);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
}

.profile-main-meta {
  flex: 1;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.profile-display-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-status-badge {
  background: #E3FCEF;
  color: var(--accent-emerald);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.profile-sub-meta {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.profile-handle {
  font-weight: 500;
}

.profile-quick-actions {
  display: flex;
  gap: 12px;
}

/* Page container padding for Dashboard & Admin */
#page-user, #page-admin {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

.user-subnav-container {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.user-subnav-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-subnav-title h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-subnav-badge {
  background: #E6F0FF;
  color: var(--brand-blue);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.user-nav-tabs {
  display: flex;
  gap: 6px;
}

.user-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.user-tab:hover {
  background: var(--bg-section);
  color: var(--text-primary);
}

.user-tab.active {
  background: #E6F0FF;
  color: var(--brand-blue);
  font-weight: 600;
  border-color: #BFDBFE;
}

.user-tab-content, .admin-tab-content {
  display: block !important;
  margin-bottom: 48px;
  scroll-margin-top: 100px;
}

.admin-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.admin-tab:hover {
  background: var(--bg-section);
  color: var(--text-primary);
}

.admin-tab.active {
  background: #E6F0FF;
  color: var(--brand-blue);
  font-weight: 600;
  border-color: #BFDBFE;
}

.profile-overview-panel, .keys-section-body, .full-view-panel {
  /* wrapper classes for tab content */
}

/* Detail Box */
.details-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.detail-box {
  padding: 16px;
  background: var(--bg-section);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.detail-box-header {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-box-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Code & Terminal */
.code-box {
  background: #1C2128;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #30363D;
}

.code-box-top, .code-box-header, .terminal-header, .code-terminal-header {
  background: #2D333B;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #30363D;
}

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

.code-tab-btn {
  background: none;
  border: none;
  color: #8B949E;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.code-tab-btn.active {
  color: #C9D1D9;
  border-bottom-color: var(--brand-blue);
}

.copy-code-btn, .copy-btn {
  background: none;
  border: none;
  color: #8B949E;
  cursor: pointer;
}

.copy-code-btn:hover, .copy-btn:hover {
  color: #C9D1D9;
}

.code-tab-content { display: none; }
.code-tab-content.active { display: block; }
.code-matrix-body, .terminal-body {
  padding: 16px;
  color: #C9D1D9;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  overflow-x: auto;
}

.code-font {
  font-family: var(--font-mono);
}

.terminal-dots, .window-controls { display: flex; gap: 6px; }
.terminal-dot, .control-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot:nth-child(1), .control-dot:nth-child(1) { background: #FF5F56; }
.terminal-dot:nth-child(2), .control-dot:nth-child(2) { background: #FFBD2E; }
.terminal-dot:nth-child(3), .control-dot:nth-child(3) { background: #27C93F; }

.terminal-title { color: #8B949E; font-size: 0.85rem; }
.terminal-clear { background: none; border: none; color: #8B949E; cursor: pointer; }
.terminal-footer { padding: 8px 16px; background: #2D333B; font-size: 0.8rem; color: #8B949E; }
.terminal-placeholder { color: #8B949E; font-style: italic; }

/* Playground */
.playground-layout {
  display: flex;
  gap: 24px;
  height: 600px;
}

.playground-pane, .playground-output-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.playground-form { padding: 24px; flex: 1; overflow-y: auto; }
.playground-output { flex: 1; background: #1C2128; color: #C9D1D9; font-family: var(--font-mono); padding: 16px; overflow-y: auto; }

/* Nodes */
.nodes-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.node-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-default);
}

.node-name { font-weight: 500; }
.node-address { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.85rem; }

/* Ticker */
.futuristic-ticker-bar {
  background: #1C2128;
  color: #C9D1D9;
  padding: 8px 0;
  overflow: hidden;
  border-bottom: 1px solid #30363D;
  display: flex;
  align-items: center;
}

.ticker-badge {
  background: var(--brand-blue);
  color: #FFF;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 16px;
  z-index: 10;
}

.pulse-emerald-dot {
  width: 8px; height: 8px; background: var(--accent-emerald); border-radius: 50%; display: inline-block; animation: pulse-emerald 2s infinite; margin-right: 8px;
}

.ticker-content-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

.ticker-sep {
  margin: 0 16px;
  color: #8B949E;
}

/* Landing Page Hero */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 80px 64px;
  align-items: center;
  background: linear-gradient(160deg, #EEF3FF 0%, #FFFFFF 60%);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-default);
}

.hero-badge {
  display: inline-block;
  background: #E6F0FF;
  color: var(--brand-blue);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-gradient-text {
  color: var(--brand-blue);
  -webkit-text-fill-color: var(--brand-blue);
  background: none;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-metrics-pills {
  display: flex;
  gap: 24px;
  align-items: center;
}

.hero-pill-item {
  display: flex;
  flex-direction: column;
}

.hero-pill-item .pill-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hero-pill-item .pill-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-pill-divider {
  width: 1px;
  height: 32px;
  background: var(--border-default);
}

.hero-media {
  position: relative;
}

.hero-demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-card-header {
  background: var(--bg-section);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-route-badge {
  background: #E6F0FF;
  color: var(--brand-blue);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.demo-card-body { padding: 16px; }
.demo-card-footer { padding: 12px 16px; background: var(--bg-section); border-top: 1px solid var(--border-default); }

.demo-metrics-strip {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.demo-stat-box {
  flex: 1;
  background: var(--bg-section);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  text-align: center;
}

.terminal-output-view {
  background: #1C2128;
  color: #C9D1D9;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-height: 120px;
}

.speed-bar-bg {
  height: 6px;
  background: var(--border-default);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.speed-bar-fill {
  height: 100%;
  background: var(--brand-blue);
  width: 75%;
}

/* Sections Global */
.models-section, .features-section, .how-it-works-section, .spotlight-section, .code-matrix-section {
  padding: 80px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title-box {
  text-align: center;
  margin-bottom: 48px;
}

.section-title-box h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-title-box p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.section-tag-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-blue);
  background: #EEF3FF;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
  border: 1px solid #BFDBFE;
}

/* Models */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.model-card:hover {
  transform: none;
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-md);
}

.model-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.model-card-top h3 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.model-badge { background: #E6F0FF; color: var(--brand-blue); padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.model-vram { color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; }
.model-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.5; }

.model-stats {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border-default);
  padding-top: 16px;
}

.m-stat { flex: 1; text-align: center; }
.m-stat .lbl { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.m-stat .val { display: block; font-weight: 600; color: var(--text-primary); margin-top: 4px; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: none;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: #E6F0FF;
  color: var(--brand-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 { margin: 0 0 12px 0; font-size: 1.2rem; font-weight: 700; }
.feature-card p { margin: 0; color: var(--text-secondary); line-height: 1.6; }

/* Spotlight */
.spotlight-section { display: flex; align-items: center; gap: 64px; }
.spotlight-img { flex: 1; }
.spotlight-img img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border-default); }
.spotlight-body { flex: 1; }
.spotlight-tag { font-weight: 600; color: var(--brand-blue); margin-bottom: 12px; display: inline-block; }
.spotlight-body h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.spotlight-body p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 24px; }
.spotlight-list { list-style: none; padding: 0; margin: 0; }
.spotlight-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 500; }
.spotlight-list li svg { color: var(--accent-emerald); }

/* How it works */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { padding: 32px; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); text-align: center; }
.step-num { width: 40px; height: 40px; background: var(--brand-blue); color: #FFF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 20px; }
.step-card h3 { margin: 0 0 12px; font-size: 1.2rem; }
.step-card p { margin: 0; color: var(--text-secondary); }

/* CTA Banner */
.cta-banner-section {
  background: var(--brand-blue);
  border-radius: var(--radius-lg);
  border: none;
  padding: 64px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 0;
  max-width: 1200px;
  margin: 64px auto;
}

.cta-banner-content h2 { color: #FFFFFF; font-size: 2rem; font-weight: 800; margin: 0 0 16px 0; }
.cta-banner-content p { color: rgba(255,255,255,0.85); margin: 0; font-size: 1.1rem; }
.cta-banner-actions { display: flex; gap: 16px; }
.cta-banner-actions .btn-md { background: #FFF; color: var(--brand-blue); }
.cta-banner-actions .btn-md:hover { background: #F6F8FA; }
.cta-banner-actions .btn-outline { border-color: rgba(255,255,255,0.3); color: #FFF; background: transparent; }
.cta-banner-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #FFF; }

/* Code Matrix */
.code-matrix-header { text-align: center; margin-bottom: 32px; }

/* Utilities */
.flex-grow, .flex-1 { flex: 1; }
.pulse-dot { width: 8px; height: 8px; background: var(--brand-blue); border-radius: 50%; animation: pulse-glow 2s infinite; }

/* Docs */
.docs-wrapper { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg-main); }
.docs-hero-header { position: relative; padding: 64px 32px; text-align: center; border-bottom: 1px solid var(--border-default); }
.docs-hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, #EEF3FF 0%, #FFFFFF 100%); z-index: 0; }
.docs-hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.docs-badge-row { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.docs-chip { padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--border-default); background: #FFF; }
.docs-chip-cyan { color: var(--brand-blue); border-color: #BFDBFE; background: #E6F0FF; }
.docs-chip-emerald { color: var(--accent-emerald); border-color: #A7F3D0; background: #E3FCEF; }
.docs-chip-purple { color: var(--accent-purple); border-color: #DDD6FE; background: #F4F0FF; }
.docs-hero-main h1 { font-size: 3rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.docs-hero-main p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 32px; }
.docs-hero-actions { display: flex; justify-content: center; gap: 16px; }
.docs-container { display: flex; max-width: 1400px; margin: 0 auto; padding: 32px; gap: 48px; width: 100%; }
.docs-sidebar { width: 260px; flex-shrink: 0; }
.docs-sidebar-inner { position: sticky; top: 96px; }
.docs-nav-group { margin-bottom: 24px; }
.docs-nav-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 12px; }
.docs-nav-link { display: block; padding: 8px 12px; color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500; transition: all 0.2s; }
.docs-nav-link:hover, .docs-nav-link.active { background: #F6F8FA; color: var(--brand-blue); }
.docs-content { flex: 1; min-width: 0; }
.docs-title { font-size: 2.5rem; font-weight: 800; margin: 0 0 16px; }
.docs-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 48px; }
.docs-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); margin-bottom: 32px; overflow: hidden; }
.docs-card-header { padding: 20px 24px; border-bottom: 1px solid var(--border-default); background: var(--bg-section); }
.docs-card-header h2, .docs-card-header h3 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.docs-card-body { padding: 24px; }
.docs-badge { padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.docs-badge-cyan { background: #E6F0FF; color: var(--brand-blue); }
.docs-badge-purple { background: #F4F0FF; color: var(--accent-purple); }
.docs-badge-amber { background: #FFFAE6; color: var(--accent-amber); }
.docs-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.docs-feature-box { padding: 24px; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
.docs-callout { padding: 16px; border-radius: var(--radius-md); border-left: 4px solid var(--border-default); margin: 24px 0; background: var(--bg-section); }
.docs-callout-info { border-left-color: var(--brand-blue); background: #E6F0FF; }
.docs-link { color: var(--brand-blue); text-decoration: none; font-weight: 500; }
.docs-link:hover { text-decoration: underline; }
.docs-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.docs-table th, .docs-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-default); }
.docs-table th { background: var(--bg-section); font-weight: 600; color: var(--text-secondary); }
.endpoint-block { margin-bottom: 48px; }
.endpoint-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-default); }
.endpoint-path { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; }
.endpoint-desc { color: var(--text-secondary); margin-bottom: 24px; }
.endpoint-details { display: grid; gap: 24px; }
.details-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.auth-pill { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; background: var(--bg-section); border: 1px solid var(--border-default); }
.auth-pill.auth-public { background: #E3FCEF; color: var(--accent-emerald); border-color: #A7F3D0; }
.method-pill { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; font-family: var(--font-mono); }
.method-pill.method-post { background: #E3FCEF; color: var(--accent-emerald); }
.method-pill.method-get { background: #E6F0FF; color: var(--brand-blue); }
.code-tab-container { background: #1C2128; border-radius: var(--radius-lg); overflow: hidden; margin-top: 24px; }
.code-tab-bar { display: flex; background: #2D333B; border-bottom: 1px solid #30363D; padding: 0 16px; }
.docs-playground-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; }
.docs-search-box { position: relative; margin-bottom: 24px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.docs-search-box input { width: 100%; padding: 10px 10px 10px 36px; border: 1px solid var(--border-default); border-radius: var(--radius-md); font-family: var(--font-sans); }

/* Admin */
.admin-authorized-content { display: block; }
.admin-access-restricted { display: none; text-align: center; padding: 64px 24px; }
.admin-access-restricted h2 { color: var(--accent-rose); margin-bottom: 16px; }
.admin-switch-user-btn { margin-top: 24px; }

/* Animations */
@keyframes pulse-emerald {
  0% { box-shadow: 0 0 0 0 rgba(0, 135, 90, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(0, 135, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 135, 90, 0); }
}

@keyframes pulse-glow {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; padding: 40px 24px; }
  .spotlight-section { flex-direction: column; }
  .steps-grid { grid-template-columns: 1fr; }
  .cta-banner-section { flex-direction: column; text-align: center; padding: 40px 24px; }
  .docs-container { flex-direction: column; }
  .docs-sidebar { width: 100%; }
  .docs-sidebar-inner { position: static; }
  .main-header { padding: 0 16px; }
  .main-nav-links { display: none; }
}

/* ===========================
   Home Page Layout
=========================== */
.home-content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

@media (max-width: 900px) {
  .home-content-wrap { padding: 0 24px 64px; }
}

/* Ghost / text button variant */
.btn-ghost {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { color: var(--text-primary); }

/* Hero badge animated dot */
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-blue);
  display: inline-block;
  animation: pulse-glow 2s infinite;
}

/* Ticker bar full-width strip under hero */
#page-home > .futuristic-ticker-bar {
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  margin: 0;
  font-size: 0.82rem;
}

/* Code matrix section light background */
.code-matrix-section {
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  padding: 40px !important;
  border: 1px solid var(--border-default);
  box-shadow: none;
}

.code-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}

.code-matrix-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 4px 0 8px;
  letter-spacing: -0.5px;
}

.code-matrix-header p {
  color: var(--text-secondary);
  margin: 0;
}

.code-matrix-header .code-tab-nav {
  align-items: center;
  gap: 4px;
  background: #2D333B;
  padding: 4px;
  border-radius: 8px;
}

.code-matrix-header .code-tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.code-matrix-header .code-tab-btn.active {
  background: #1C2128;
  color: #FFF;
  border-bottom: none;
}

/* Code block body */
.code-matrix-body pre {
  background: #1C2128;
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 0;
  overflow-x: auto;
}

.code-matrix-body code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #C9D1D9;
  line-height: 1.7;
}

.code-keyword { color: #FF7B72; }
.code-str { color: #A5D6FF; }

.code-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #30363D;
  background: #2D333B;
  color: #8B949E;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.copy-code-btn {
  background: none;
  border: none;
  color: #8B949E;
  cursor: pointer;
  font-size: 0.85rem;
}

.copy-code-btn:hover { color: #C9D1D9; }

/* Spotlight section: image + text layout */
.spotlight-section {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 80px 0 !important;
  align-items: center;
}

.spotlight-img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  display: block;
}

.spotlight-body h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.spotlight-body p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.spotlight-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spotlight-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
}

/* glow-button white variant in CTA */
.cta-banner-actions .glow-button {
  background: #FFF;
  color: var(--brand-blue);
  font-weight: 700;
}

.cta-banner-actions .glow-button:hover {
  background: #F6F8FA;
}

/* Demo card dark terminal look */
.hero-demo-card {
  background: #1C2128;
  border: 1px solid #30363D;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-demo-card .demo-card-header {
  background: #2D333B;
  border-bottom: 1px solid #30363D;
}

.hero-demo-card .demo-card-footer {
  background: #2D333B;
  border-top: 1px solid #30363D;
}

.hero-demo-card .demo-card-body {
  background: #1C2128;
  padding: 16px;
}

.hero-demo-card .demo-metrics-strip {
  background: #161B22;
  border: 1px solid #30363D;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.hero-demo-card .d-label { font-size: 0.65rem; font-weight: 700; color: #8B949E; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.hero-demo-card .d-val { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700; }

.terminal-output-view {
  background: #0D1117;
  border: 1px solid #30363D;
  border-radius: var(--radius-sm);
  color: #C9D1D9;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 12px;
  min-height: 140px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.speed-bar-bg {
  height: 4px;
  background: #30363D;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.speed-bar-fill {
  height: 100%;
  background: var(--brand-blue);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Demo stat flex layout */
.demo-metrics-strip {
  display: flex;
  gap: 16px;
  align-items: center;
}

.demo-stat-box {
  flex: 0 0 auto;
}

.demo-stat-box.flex-grow { flex: 1; }

/* Width utility */
.width-full { width: 100%; justify-content: center; }

/* Ensure glow-button as block in footer works */
.glow-button.btn-md {
  padding: 10px 20px;
}

/* Demo route badge dark */
.demo-route-badge {
  background: rgba(0, 105, 255, 0.15);
  color: #79C0FF;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 105, 255, 0.3);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58A6FF;
  animation: pulse-glow 1.5s infinite;
}

/* Header auth/sign-in button */
.login-btn-link {
  background: var(--brand-blue);
  color: #FFF;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.login-btn-link:hover {
  background: var(--brand-blue-dark);
}

/* Signout button */
.signout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  font-family: var(--font-sans);
}

.signout-btn:hover { color: var(--accent-rose); }

/* User identity in header */
.user-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.plan-pill, .tc-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

.plan-pill { background: #E6F0FF; color: var(--brand-blue); }
.tc-pill { background: #E3FCEF; color: var(--accent-emerald); }

/* Misc missing */
.btn-hero-action { display: inline-flex; align-items: center; gap: 6px; }
.meta-separator { color: var(--text-muted); }
.profile-email { color: var(--text-secondary); font-size: 0.9rem; }
.title-icon-cyan { color: var(--brand-blue); }
.title-icon-blue { color: var(--brand-blue); }

/* Admin page */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Responsive: mobile hero */
@media (max-width: 900px) {
  .spotlight-section {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }
  .steps-grid { grid-template-columns: 1fr !important; }
  .hero-title { font-size: 2.4rem; }
  .code-matrix-section { padding: 24px !important; }
  .playground-split-layout { grid-template-columns: 1fr !important; }
}

/* ==========================================================================
   ENHANCED INFERENCE PLAYGROUND WORKBENCH STYLING
   ========================================================================== */
.playground-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.playground-config-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card-title-row {
  margin-bottom: 20px;
}

.card-title-row h3 {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-title-row .text-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.preset-chips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--bg-section);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.preset-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preset-chip {
  background: #ffffff;
  border: 1px solid var(--border-default);
  color: var(--brand-blue);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-chip:hover {
  background: #E6F0FF;
  border-color: #BFDBFE;
  transform: translateY(-1px);
}

.playground-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.config-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.config-val-badge {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: #E6F0FF;
  color: var(--brand-blue);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Terminal Card Right Column */
.playground-terminal-card {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
}

.playground-terminal-card .terminal-header {
  background: #1E293B;
  padding: 14px 20px;
  border-bottom: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-header-left, .terminal-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.playground-terminal-card .terminal-title {
  color: #94A3B8;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.terminal-clear-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.terminal-clear-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.playground-terminal-card .terminal-body {
  flex: 1;
  min-height: 280px;
  max-height: 380px;
  overflow-y: auto;
  padding: 20px;
  background: #0B0F19;
  color: #38BDF8;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.playground-terminal-card .terminal-placeholder {
  color: #64748B;
  font-style: italic;
  line-height: 1.6;
}

.playground-terminal-card .terminal-footer {
  background: #1E293B;
  border-top: 1px solid #334155;
  padding: 12px 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.t-metric-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94A3B8;
}

.t-icon {
  font-size: 0.9rem;
}

/* ==========================================================================
   MODERN PARAMETER CONTROLS & SWITCH STYLING
   ========================================================================== */
.modern-params-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-section);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
}

.modern-param-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modern-param-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modern-param-label svg {
  color: var(--brand-blue);
}

.modern-val-pill {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: #E6F0FF;
  color: var(--brand-blue);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid #BFDBFE;
}

/* Range Slider */
.modern-range-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: #E2E8F0;
  border-radius: 4px;
  outline: none;
  margin-top: 4px;
}

.modern-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-blue);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 105, 255, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
}

.modern-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--brand-blue-dark);
}

/* Custom Select Dropdown */
.modern-select-wrapper {
  position: relative;
}

.modern-select-input {
  width: 100%;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.modern-select-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.12);
}

/* Toggle Item Switch */
.modern-toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
}

.toggle-info {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toggle-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Switch Toggle Styling */
.modern-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.modern-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 34px;
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider-toggle {
  background-color: var(--brand-blue);
}

input:checked + .slider-toggle:before {
  transform: translateX(22px);
}

/* ==========================================================================
   UNAUTHENTICATED SIGN IN STATE CARD STYLING
   ========================================================================== */
.unauth-card {
  max-width: 500px;
  margin: 80px auto;
  padding: 44px 40px;
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.unauth-icon-box {
  font-size: 3.2rem;
  margin-bottom: 16px;
}

.unauth-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.unauth-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.unauth-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

