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

:root {
  --bg-deep: #050507;
  --bg-surface: #0a0b0f;
  --text-main: #f8fafc;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-silver: #e2e8f0;
  --accent-chrome: #94a3b8;
  --accent-mint: #9ef59a;
  --accent-ice: #7dd3fc;
  --card-bg: rgba(13, 14, 20, 0.72);
  --card-bg-hover: rgba(18, 20, 28, 0.82);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.18);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.68);
  --radius-lg: 24px;
  --radius-md: 14px;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Orbitron', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, monospace;
}

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

html, body {
  min-height: 100vh;
  width: 100%;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  position: relative;
}

::selection {
  background: rgba(158, 245, 154, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   Interactive Particle Background Canvas & Cyber Grid Overlay
   ========================================================================== */
#canvas-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.22, 0.8, 0.32, 1);
}

body.bg-fade-in #canvas-bg {
  opacity: 1;
}

.bg-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 35%, transparent 0%, rgba(5, 5, 7, 0.72) 85%),
    linear-gradient(to right, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
}

.ambient-light {
  position: fixed;
  border-radius: 50%;
  filter: blur(150px);
  -webkit-filter: blur(150px);
  z-index: -2;
  opacity: 0.22;
  pointer-events: none;
  animation: floatAmbient 14s infinite alternate ease-in-out;
}

.light-1 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #ffffff 0%, #64748b 70%, transparent 100%);
  top: -160px;
  left: -120px;
}

.light-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #cbd5e1 0%, #334155 70%, transparent 100%);
  bottom: -220px;
  right: -140px;
  animation-delay: -7s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(45px, 35px) scale(1.15); }
}

/* ==========================================================================
   Floating Pill Header (Matching NullDev Main Site)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 120;
  padding: 0 16px;
  pointer-events: none;
}

.header-inner {
  pointer-events: auto;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
  height: 50px;
  max-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  background: rgba(10, 11, 16, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.site-header .nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  border-bottom: none !important;
  color: #ffffff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-mint);
  background: rgba(158, 245, 154, 0.1);
  border: 1px solid rgba(158, 245, 154, 0.25);
  padding: 3px 7px;
  border-radius: 6px;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.brand-divider {
  color: rgba(255, 255, 255, 0.22);
  font-weight: 400;
}

.brand-highlight {
  background: linear-gradient(90deg, #ffffff 0%, #8a94a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  font-size: 13.5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.nav a, .nav button.nav-pill {
  color: #cbd5e1;
  text-decoration: none;
  border: none;
  border-bottom: none;
  background: transparent;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active,
.nav button.nav-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav a.nav-cta,
.nav button.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
}

.nav a.nav-cta:hover,
.nav button.nav-cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 10px var(--accent-mint);
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent-mint);
  opacity: 0.6;
  animation: pulseRing 2.2s infinite cubic-bezier(0.22, 0.8, 0.32, 1);
}

@keyframes pulseRing {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ==========================================================================
   Section Tags, Headings & Glass Cards
   ========================================================================== */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-mint);
  background: rgba(158, 245, 154, 0.08);
  border: 1px solid rgba(158, 245, 154, 0.2);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.container {
  width: 100%;
  max-width: 1120px;
  padding: 0 24px;
  margin: 116px auto 64px;
  position: relative;
  z-index: 1;
}

.auth-split-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.auth-info-col h1 {
  text-align: left;
  font-size: clamp(32px, 4.5vw, 48px);
  margin-bottom: 16px;
}

.auth-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 540px;
}

.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(13, 14, 20, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.32, 1), border-color 0.32s ease, box-shadow 0.32s ease;
}

.auth-feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.auth-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(158, 245, 154, 0.1);
  border: 1px solid rgba(158, 245, 154, 0.24);
  color: var(--accent-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.auth-feature-text h4 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.auth-feature-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  text-align: left;
}

@media (max-width: 900px) {
  .auth-split-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .container {
    margin-top: 96px;
    padding: 0 18px;
  }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  margin-bottom: 24px;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 48%, #64748b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.32, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(255, 255, 255, 0.065),
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Inputs, Selects & Buttons (NullDev Chrome-Platinum Style)
   ========================================================================== */
label {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: block;
}

input, select, textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 18px;
  transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(158, 245, 154, 0.45);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(158, 245, 154, 0.1);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.24s cubic-bezier(0.22, 0.8, 0.32, 1);
  outline: none;
}

.btn.primary {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  color: #050507;
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.15), inset 0 1px 0 #ffffff;
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 255, 255, 0.25), inset 0 1px 0 #ffffff;
}

.btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.ghost-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  margin-bottom: 14px;
}

.btn.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.admin-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: left;
  line-height: 1.55;
}

.admin-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1) 50%, transparent);
  margin: 12px 0 20px;
  width: 100%;
}

p {
  font-size: 14.5px;
  color: var(--text-secondary);
  text-align: center;
}

a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  border-bottom: none;
  transition: border-color 0.2s, color 0.2s;
}

p a, .content-text a {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.28);
}

.site-header a,
.site-header .brand,
.site-header .nav a,
.pill-badge,
.btn,
.dash-tab-pill {
  border-bottom: none !important;
  text-decoration: none !important;
}

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

.result-msg {
  margin-top: -6px;
  margin-bottom: 14px;
  font-size: 13.5px;
  min-height: 18px;
  text-align: left;
  font-weight: 500;
  line-height: 1.45;
  color: #f87171;
}

.result-msg.success {
  color: var(--accent-mint);
}

.fade-target {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 650ms cubic-bezier(0.22, 0.8, 0.32, 1), transform 650ms cubic-bezier(0.22, 0.8, 0.32, 1);
}

.hidden-section {
  display: none;
  opacity: 0;
  transform: translateY(12px);
}

.hidden-section.show {
  display: block;
  animation: slideInAdminSection 0.45s cubic-bezier(0.22, 0.8, 0.32, 1) forwards;
}

@keyframes slideInAdminSection {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Custom Glass Dialog & Toast Notification (No Native Browser Alerts)
   ========================================================================== */
.null-toast, #toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: rgba(12, 14, 20, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(158, 245, 154, 0.35);
  color: #f8fafc;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75);
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.22, 0.8, 0.32, 1);
}

.null-toast.show, #toast-box.show {
  transform: translateY(0);
  opacity: 1;
}

.null-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(3, 4, 7, 0.78);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.null-dialog-backdrop.open {
  display: flex;
}

.null-dialog-card {
  width: 100%;
  max-width: 440px;
  padding: 28px 26px !important;
  margin-bottom: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.null-dialog-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-mint);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.null-dialog-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.null-dialog-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-line;
}

.null-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.null-dialog-actions .btn {
  flex: 1;
  margin: 0 !important;
  padding: 12px 16px;
  font-size: 14px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0c0d14 inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

@media (max-width: 768px) {
  .site-header {
    top: max(8px, env(safe-area-inset-top, 8px));
    padding: 0 12px;
  }
  .header-inner {
    height: 46px;
    max-height: 46px;
    padding: 0 14px;
    gap: 8px;
    flex-wrap: nowrap !important;
    overflow: hidden;
  }
  .brand {
    font-size: 15px;
    gap: 6px;
    flex-shrink: 0;
  }
  .brand-mark {
    padding: 2px 5px;
    font-size: 11px;
  }
  .brand-name {
    font-size: 14.5px;
  }
  .brand-highlight, .brand-divider {
    display: none !important;
  }
  .nav {
    flex-wrap: nowrap !important;
    gap: 6px;
    flex-shrink: 0;
  }
  .nav a {
    padding: 6px 10px;
    font-size: 12px;
  }
  .container {
    margin-top: 72px;
    padding: 0 16px;
  }
}

@media (max-width: 640px) {
  .site-header {
    top: max(6px, env(safe-area-inset-top, 6px));
    padding: 0 10px;
  }
  .header-inner {
    height: 46px;
    max-height: 46px;
    padding: 0 12px;
  }
}
