:root {
  --bg: #0a1628;
  --purple: #8b5cf6;
  --blue: #00adff;
  --mint: #00d9c0;
  --white: #ffffff;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --sf: 'Space Grotesk', sans-serif;
  --bf: 'Inter', sans-serif;
}

/* ═══════════════════════════════════════════
   1. RESET & BASE (Cross-Page Spec §0.4)
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--bf);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-300);
  background: linear-gradient(135deg, #0a1628 0%, #0d1a2d 50%, #0a1628 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════
   2. ACCESSIBILITY (Cross-Page Spec §9)
   ═══════════════════════════════════════════ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--purple);
  color: var(--white);
  border-radius: 0 0 8px 8px;
  font-family: var(--bf);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .gradient-text {
    -webkit-text-fill-color: unset !important;
    background: none !important;
    color: LinkText !important;
  }
}

/* ═══════════════════════════════════════════
   3. LAYOUT
   ═══════════════════════════════════════════ */
.ge-page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  padding: 2rem 1.5rem;
}

.ge-content-area {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

/* ═══════════════════════════════════════════
   4. AMBIENT GLOWS
   ═══════════════════════════════════════════ */
.ge-ambient-glow-1,
.ge-ambient-glow-2 {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.ge-ambient-glow-1 {
  background: radial-gradient(ellipse 80% 50% at 70% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}
.ge-ambient-glow-2 {
  background: radial-gradient(ellipse 60% 40% at 30% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════
   5. NEURAL CANVAS
   ═══════════════════════════════════════════ */
#ge-neural-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   6. GLASSMORPHIC CARD
   ═══════════════════════════════════════════ */
.ge-glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 48px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.ge-glass-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   7. WARNING ICON
   ═══════════════════════════════════════════ */
.ge-icon-wrap {
  margin-bottom: 24px;
}
.ge-icon-wrap svg {
  display: block;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   8. TYPOGRAPHY
   ═══════════════════════════════════════════ */
.ge-card-heading {
  font-family: var(--sf);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 12px;
}
.gradient-text {
  color: var(--purple); /* fallback — Cross-Page Spec §2 */
  background: linear-gradient(90deg, #8b5cf6 0%, #00adff 50%, #00d9c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ge-card-body {
  color: var(--gray-300);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ═══════════════════════════════════════════
   9. CHECKBOX / CONFIRMATION
   ═══════════════════════════════════════════ */
.ge-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  margin-bottom: 32px;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s;
  min-height: 44px;
}
.ge-confirm-label.ge-confirmed {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}
.ge-checkbox-target {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin: -12px 0 -12px -12px;
}
.ge-checkbox-target input[type="checkbox"] {
  accent-color: var(--purple);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.ge-confirm-text {
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1.5;
  padding-top: 2px;
}

/* ═══════════════════════════════════════════
   10. BUTTONS
   ═══════════════════════════════════════════ */
.ge-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* --- Delete button --- */
.ge-btn-delete {
  width: 100%;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: var(--bf);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 44px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  color: var(--gray-500);
}
.ge-btn-delete.ge-enabled {
  cursor: pointer;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}
.ge-btn-delete.ge-enabled:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.2), inset 0 0 24px rgba(239, 68, 68, 0.06);
  transform: translateY(-1px);
}
.ge-btn-delete-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.ge-btn-delete.ge-enabled:hover .ge-btn-delete-sweep {
  transform: translateX(100%);
}
.ge-btn-delete-label {
  position: relative;
  z-index: 1;
}

/* --- Cancel button (secondary — Cross-Page Spec §0.10) --- */
.ge-btn-secondary {
  width: 100%;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: var(--bf);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.3s;
  position: relative;
  overflow: visible; /* Cross-Page Spec §0.10: overflow: visible on button */
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: none;
}
.ge-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Static white border (default state) */
.ge-btn-border-static {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.3s;
  pointer-events: none;
}
.ge-btn-secondary:hover .ge-btn-border-static {
  opacity: 0;
}

/* Gradient SVG border — Cross-Page Spec §0.10 */
.ge-border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible; /* Cross-Page Spec §0.10: overflow: visible on SVG */
  pointer-events: none;
}
.ge-border-svg rect {
  stroke-dasharray: 1000; /* Cross-Page Spec §0.10: always 1000, never 500 */
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 0.6s ease-out;
}
.ge-btn-secondary:hover .ge-border-svg rect {
  stroke-dashoffset: 0;
}

/* Hover glow */
.ge-btn-glow {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.ge-btn-secondary:hover .ge-btn-glow {
  opacity: 1;
}

/* Button text */
.ge-btn-text {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   11. HELP LINK
   ═══════════════════════════════════════════ */
.ge-help-text {
  color: var(--gray-300);
  font-size: 0.875rem;
  margin-top: 24px;
}
.ge-help-text a {
  color: var(--blue);
  text-decoration: underline;
  padding: 8px 4px;
  margin: -8px -4px;
  display: inline-block;
}

/* ═══════════════════════════════════════════
   12. STATE VIEWS
   ═══════════════════════════════════════════ */
.ge-view-confirm,
.ge-view-success {
  position: relative;
  z-index: 1;
}
.ge-view-success {
  display: none;
}
body.ge-deleted .ge-view-confirm { display: none; }
body.ge-deleted .ge-view-success { display: block; }

/* ═══════════════════════════════════════════
   13. MOBILE (Cross-Page Spec §10)
   ═══════════════════════════════════════════ */
@media (max-width: 520px) {
  .ge-glass-card {
    padding: 36px 20px;
  }
}