/* ============================================
   SimplySimpleApps — Shared Stylesheet
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* --- Theme Variables --- */
:root {
  /* Dark theme (Midnight) — default */
  --bg: #0F1117;
  --surface: #1A1D27;
  --accent: #4ECDC4;
  --accent-hover: #3DBDB5;
  --gold: #FFD700;
  --text: #E8EAF0;
  --text-secondary: #8890A4;
  --border: #2A2D3A;
  --shadow: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg: #F0F4F8;
  --surface: #E2E8F0;
  --accent: #2E86DE;
  --accent-hover: #2472C2;
  --gold: #FFD700;
  --text: #1E293B;
  --text-secondary: #64748B;
  --border: #CBD5E1;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

/* --- Layout --- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / Nav --- */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background-color: var(--bg);
  z-index: 100;
  transition: background-color 0.3s ease;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-name {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

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

/* --- Theme Toggle --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Language Selector --- */
.lang-select {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-align: center;
  min-width: 3.2rem;
}

.lang-select:hover,
.lang-select:focus {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.lang-select option {
  background: var(--surface);
  color: var(--text);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

/* Default (dark): show sun icon to switch to light */
.theme-toggle .icon-sun {
  display: inline;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: inline;
}

/* --- Hero --- */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1rem;
}

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

.tagline {
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- Section --- */
.section {
  padding: 4rem 0;
}

.section-title {
  margin-bottom: 2rem;
  text-align: center;
}

.section-title::before {
  content: '> ';
  color: var(--accent);
  font-family: 'Space Mono', monospace;
}

/* --- App Grid --- */
.app-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Card --- */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--shadow);
}

.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  height: 100%;
}

.card-link:hover {
  color: inherit;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  color: var(--text);
}

.badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background-color: var(--gold);
  color: #0F1117;
  white-space: nowrap;
}

.badge-testing {
  background-color: var(--accent);
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-arrow {
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: auto;
}

/* Card accent borders */
.card-accent-teal {
  border-left: 3px solid var(--accent);
}

.card-accent-gold {
  border-left: 3px solid var(--gold);
}

/* --- Philosophy --- */
.philosophy {
  border-top: 1px solid var(--border);
}

.philosophy-content {
  max-width: 640px;
  margin: 0 auto;
}

.philosophy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.philosophy-list li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
}

.philosophy-list li::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --- App Page Header --- */
.app-hero {
  padding: 4rem 0 2rem;
}

.app-hero h1 {
  margin-bottom: 0.5rem;
}

.app-oneliner {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.app-hero .badge {
  display: inline-block;
}

/* --- Feature Lists --- */
.feature-list,
.anti-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 640px;
}

.feature-list li,
.anti-feature-list li {
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}

.feature-list li::before {
  content: '+';
  position: absolute;
  left: 0;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

.anti-feature-list li::before {
  content: '×';
  position: absolute;
  left: 0.1rem;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* --- Pricing Philosophy --- */
.pricing-note {
  max-width: 640px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.pricing-note strong {
  color: var(--text);
}

/* --- Back Link --- */
.back-link {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  margin-top: 3rem;
  padding: 0.5rem 0;
}

.back-link::before {
  content: '← ';
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
  text-align: center;
}

.footer-brand {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-legal {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-legal a {
  color: var(--text-secondary);
}

.footer-legal a:hover {
  color: var(--accent);
}

/* --- Legal / Content Pages --- */
.legal-page {
  max-width: 640px;
  padding: 3rem 0 2rem;
}

.legal-page h1 {
  margin-bottom: 0.5rem;
}

.legal-page .legal-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.legal-section h2::before {
  content: '> ';
  color: var(--accent);
  font-family: 'Space Mono', monospace;
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

.legal-list li {
  padding-left: 2rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-list li::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

.legal-updated {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.legal-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

.legal-steps li {
  padding-left: 2rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
  counter-increment: step;
}

.legal-steps li::before {
  content: counter(step) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

.legal-note {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-note strong {
  color: var(--text);
}

/* --- Auth Pages --- */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.auth-card h2 {
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-card h2::before {
  content: '> ';
  color: var(--accent);
  font-family: 'Space Mono', monospace;
}

.auth-field {
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.auth-field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #0F1117;
  background-color: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  margin-top: 0.5rem;
}

.auth-btn:hover {
  background-color: var(--accent-hover);
}

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

.auth-error {
  font-size: 0.9rem;
  color: #f87171;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-success-msg {
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.6;
}

.auth-success-msg .checkmark {
  font-size: 2.5rem;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}

.auth-error-msg {
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.6;
}

.auth-error-msg .error-icon {
  font-size: 2.5rem;
  color: #f87171;
  display: block;
  margin-bottom: 1rem;
}

/* Spinner */
.auth-spinner {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.auth-spinner.visible {
  display: block;
}

.spinner-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent);
  animation: spinner-pulse 1.4s infinite ease-in-out both;
  margin: 0 4px;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0s; }

@keyframes spinner-pulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.spinner-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* Inline spinner (inside form card during submit) */
.auth-inline-spinner {
  text-align: center;
  padding: 2rem 0 1rem;
}

/* Views — hidden by default */
.auth-view { display: none; }
.auth-view.active { display: block; }

/* Footer — minimal (auth pages) */
.auth-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
}

.auth-footer p {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Auth tabs (login page) */
.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Google sign-in button */
.auth-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1E293B;
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.auth-btn-google:hover {
  background-color: #f8f9fa;
  border-color: var(--accent);
}

.auth-btn-google svg {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Divider ("or") */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

.auth-divider span {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0 0.75rem;
}

/* Warning box (private account) */
.auth-warning {
  background-color: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--gold);
  line-height: 1.5;
}

/* Link row (forgot password, sign up link) */
.auth-link-row {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.auth-link-row a {
  color: var(--accent);
  font-family: 'Space Mono', monospace;
}

/* Account info (account panel) */
.account-info {
  margin-bottom: 2rem;
}

.account-info-row {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.account-info-row:first-child {
  border-top: 1px solid var(--border);
}

.account-info-row .info-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.account-info-row .info-value {
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-all;
}

/* Danger button (delete account) */
.auth-btn-danger {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background-color: #dc2626;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  margin-top: 0.5rem;
}

.auth-btn-danger:hover {
  background-color: #b91c1c;
}

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

/* Secondary button (sign out) */
.auth-btn-secondary {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  margin-top: 0.75rem;
}

.auth-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Confirmation dialog overlay */
.auth-dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-dialog-overlay.visible {
  display: flex;
}

.auth-dialog {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-dialog h3 {
  margin-bottom: 1rem;
  color: #f87171;
}

.auth-dialog h3::before {
  content: '> ';
  color: #f87171;
  font-family: 'Space Mono', monospace;
}

.auth-dialog p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.auth-dialog-actions {
  display: flex;
  flex-direction: column;
}

.auth-dialog-actions .auth-btn-danger {
  margin-top: 0;
}

.auth-dialog-actions .auth-btn-secondary {
  margin-top: 0.5rem;
}

/* Change password details (account panel) */
.auth-details {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.auth-details summary {
  padding: 0.75rem 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.auth-details summary::-webkit-details-marker {
  display: none;
}

.auth-details summary::before {
  content: '+ ';
  color: var(--accent);
}

.auth-details[open] summary::before {
  content: '- ';
}

.auth-details .auth-details-content {
  padding: 0 1rem 1rem;
}

/* --- Ex:Agere — Core Loop Flow --- */
.loop-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.loop-step {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}

.loop-step-number {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.loop-step-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

.loop-step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.loop-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  color: var(--accent);
  padding: 0 0.75rem;
  flex-shrink: 0;
}

/* --- Ex:Agere — Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 640px;
}

.feature-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.25rem;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}

.feature-card-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 0.3rem;
}

.feature-card-label::before {
  content: '+ ';
  color: var(--accent);
}

.feature-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Ex:Agere — Tier List --- */
.tier-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
}

.tier-item {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.tier-level {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 7rem;
  flex-shrink: 0;
}

.tier-title {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .tagline {
    font-size: 1.05rem;
  }

  .section {
    padding: 2.5rem 0;
  }


  .auth-card {
    padding: 2rem 1.25rem;
  }

  .loop-flow {
    flex-direction: column;
    align-items: center;
  }

  .loop-step {
    max-width: 100%;
    width: 100%;
  }

  .loop-arrow {
    transform: rotate(90deg);
    padding: 0.5rem 0;
  }

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

/* ============================================
   Admin Panel
   ============================================ */

/* Admin label in header */
.admin-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0F1117;
  background-color: var(--gold);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Admin main — wider content area */
.admin-main {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Admin nav links */
.admin-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.admin-nav-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.admin-nav-link:hover {
  color: var(--text);
}

.admin-nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Admin section title */
.admin-section-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.admin-section-title::before {
  content: '> ';
  color: var(--accent);
}

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

.admin-stat-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}

.admin-stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

.admin-stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Data tables */
.admin-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

.admin-table tr:hover td {
  background-color: var(--surface);
}

/* Small action buttons */
.admin-btn-sm {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: none;
  color: var(--accent);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.admin-btn-sm:hover {
  background-color: var(--accent);
  color: #0F1117;
}

.admin-btn-sm-danger {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border: 1px solid #f87171;
  border-radius: 4px;
  background: none;
  color: #f87171;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.admin-btn-sm-danger:hover {
  background-color: #f87171;
  color: #fff;
}

/* Pagination */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.admin-pagination button {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.admin-pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  background-color: var(--surface);
}

.admin-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Filter bar */
.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-filter-bar select,
.admin-filter-bar input {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.admin-filter-bar select:focus,
.admin-filter-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-filter-bar select {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.5rem;
  cursor: pointer;
}

/* Code output area */
.admin-code-output {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

/* Admin form sections */
.admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-form-row .auth-field {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

/* Inline detail row (expandable) */
.admin-detail-row {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* Responsive admin */
@media (max-width: 640px) {
  .admin-main {
    padding: 1.5rem 1rem;
  }

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

  .admin-form-row {
    flex-direction: column;
  }

  .admin-nav {
    gap: 0.25rem 0.75rem;
  }
}

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