/* ═══════════════════════════════════════════
   CORE VARIABLES & RESET
═══════════════════════════════════════════ */
:root { 
  --bg: #090c10; --accent: #c8aa6e; --accent-dim: #7a5c30; 
  --text: #c8c0b0; --text-dim: #7a7060; --glass-border: rgba(255,255,255,0.08);
  --c-orange: #f5a623; --c-orange-dim: #8a5d14;
  --c-cyan: #0bc6e3; --c-cyan-dim: #055e6c; 
  --c-silver: #e2e8f0; --c-silver-dim: #718096; 
  --c-green: #28ab64; --c-green-dim: #165d36; 
  --c-red: #e56b6b; --c-red-dim: #8c3e3e;
  --c-purple: #9b6dff; --c-purple-dim: #5a3d99;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; font-family: 'Barlow', sans-serif; background: var(--bg); color: var(--text); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ─── BACKGROUND & OVERLAY ─── */
.bg-layer { position: absolute; inset: -20px; z-index: -2; background-image: url('/images/demacia-bg.jpg'); background-size: cover; background-position: center; filter: brightness(0.85); }
.bg-overlay { position: absolute; inset: 0; z-index: -1; background: rgba(9, 12, 16, 0.45); }

/* ─── ANIMATIONS ─── */
@keyframes focusIn { 0% { opacity: 0; filter: blur(12px); transform: translateY(-10px); } 100% { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes floatUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-4px); } }
@keyframes pulseLine { 0% { transform: translateX(-100%); width: 20%; opacity: 0.5; } 50% { opacity: 1; } 100% { transform: translateX(500%); width: 60%; opacity: 0.5; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
.anim-card { opacity: 0; animation: floatUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards 0.2s; }

/* ─── HEADER & THEMES ─── */
.brand-header { 
  position: absolute; top: 40px; left: 0; width: 100%; 
  text-align: center; z-index: 10; animation: focusIn 1s forwards;
  pointer-events: none;
}

.brand-header h1 { font-family: 'Cinzel', serif; font-size: 38px; font-weight: 900; color: var(--accent); letter-spacing: 8px; margin-bottom: 15px; text-shadow: 0 0 15px rgba(200,170,110,0.6), 0 0 30px rgba(200,170,110,0.3), 0 4px 4px rgba(0,0,0,0.8); }

.sub-row { display: flex; align-items: center; justify-content: center; gap: 14px; width: 480px; margin: 0 auto; transition: all 0.5s ease; }
.sub-diamond { width: 8px; height: 8px; transform: rotate(45deg); transition: all 0.5s ease; }
.sub-line { flex: 1; height: 1px; transition: all 0.5s ease; }
.sub-text { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; letter-spacing: 6px; text-transform: uppercase; font-weight: 700; transition: all 0.5s ease; padding: 0 6px; }

.sub-text + .sub-diamond { margin-left: -6px !important; }

.header-silver .sub-diamond { background: #ffffff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }
.header-silver .sub-line { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4)); }
.header-silver .sub-line.right { background: linear-gradient(90deg, rgba(255,255,255,0.4), transparent); }
.header-silver .sub-text { color: #ffffff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0,0,0,0.9); }

.header-orange .sub-diamond { background: var(--c-orange); box-shadow: 0 0 12px var(--c-orange); }
.header-orange .sub-line { background: linear-gradient(90deg, transparent, var(--c-orange-dim)); }
.header-orange .sub-line.right { background: linear-gradient(90deg, var(--c-orange-dim), transparent); }
.header-orange .sub-text { color: var(--c-orange); text-shadow: 0 0 8px rgba(245, 166, 35, 0.3); }

.header-cyan .sub-diamond { background: var(--c-cyan); box-shadow: 0 0 12px var(--c-cyan); }
.header-cyan .sub-line { background: linear-gradient(90deg, transparent, var(--c-cyan-dim)); }
.header-cyan .sub-line.right { background: linear-gradient(90deg, var(--c-cyan-dim), transparent); }
.header-cyan .sub-text { color: var(--c-cyan); text-shadow: 0 0 8px rgba(11, 198, 227, 0.3); }

.header-green .sub-diamond { background: var(--c-green); box-shadow: 0 0 12px var(--c-green); }
.header-green .sub-line { background: linear-gradient(90deg, transparent, var(--c-green-dim)); }
.header-green .sub-line.right { background: linear-gradient(90deg, var(--c-green-dim), transparent); }
.header-green .sub-text { color: var(--c-green); text-shadow: 0 0 8px rgba(40, 171, 100, 0.3); }

.header-red .sub-diamond { background: var(--c-red); box-shadow: 0 0 12px var(--c-red); }
.header-red .sub-line { background: linear-gradient(90deg, transparent, var(--c-red-dim)); }
.header-red .sub-line.right { background: linear-gradient(90deg, var(--c-red-dim), transparent); }
.header-red .sub-text { color: var(--c-red); text-shadow: 0 0 8px rgba(229, 107, 107, 0.3); }

.header-purple .sub-diamond { background: var(--c-purple); box-shadow: 0 0 12px var(--c-purple); }
.header-purple .sub-line { background: linear-gradient(90deg, transparent, var(--c-purple-dim)); }
.header-purple .sub-line.right { background: linear-gradient(90deg, var(--c-purple-dim), transparent); }
.header-purple .sub-text { color: var(--c-purple); text-shadow: 0 0 8px rgba(155, 109, 255, 0.3); }

/* ─── ENLARGED GLASS CARD ─── */
.glass-card { 
  background: rgba(12, 16, 22, 0.85); border: 1px solid var(--glass-border); border-radius: 20px; 
  width: 640px; padding: 100px 70px 80px 70px; max-width: 95vw; 
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.03); 
  text-align: center; position: relative; overflow: hidden; 
  min-height: 580px; transition: height 0.3s ease; margin-top: 60px; 
}
.card-pane { position: absolute; top: 100px; left: 70px; right: 70px; bottom: 80px; display: flex; flex-direction: column; align-items: center; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1); }
.card-pane.active { opacity: 1; visibility: visible; pointer-events: all; transform: translateY(0); }
.card-desc { font-size: 18px; font-weight: 400; color: rgba(200, 192, 176, 0.85); margin-bottom: 35px; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); line-height: 1.5; font-family: 'Barlow', sans-serif; }
.push-down { margin-top: 40px; }

/* ─── GLOBAL INPUT SYNC ─── */
.input-wrap { width: 85%; margin: 0 auto 25px auto; position: relative; }
.app-input { 
  width: 100%; height: 60px; background: rgba(5, 8, 12, 0.6); border: 1px solid var(--glass-border); color: #fff; 
  border-radius: 40px; padding: 0 24px; font-family: 'Barlow', sans-serif; font-size: 17px; 
  text-align: center; outline: none; transition: all 0.3s ease; 
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.3); letter-spacing: 1px; color-scheme: dark;
}
.app-input::placeholder { color: rgba(200, 192, 176, 0.4); }

.focus-cyan:focus { border-color: var(--c-cyan) !important; box-shadow: inset 0 4px 15px rgba(0,0,0,0.9), 0 0 15px rgba(11,198,227,0.2) !important; }
.focus-orange:focus { border-color: var(--c-orange) !important; box-shadow: inset 0 4px 15px rgba(0,0,0,0.9), 0 0 15px rgba(245, 166, 35, 0.2) !important; }
.focus-red:focus { border-color: var(--c-red) !important; box-shadow: inset 0 4px 15px rgba(0,0,0,0.9), 0 0 15px rgba(229, 107, 107, 0.2) !important; }
.focus-purple:focus { border-color: var(--c-purple) !important; box-shadow: inset 0 4px 15px rgba(0,0,0,0.9), 0 0 15px rgba(155, 109, 255, 0.2) !important; }
.app-input.error, .digit-box.error { border-color: var(--c-red) !important; box-shadow: inset 0 4px 10px rgba(0,0,0,0.8), 0 0 15px rgba(229,107,107,0.2) !important; color: var(--c-red); }

/* ─── DYNAMIC PASSWORD PILL ─── */
.pw-pill-wrapper {
  position: relative;
  width: 100%;
  height: 40px; 
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  z-index: 50; 
}

.pw-strength-pill {
  position: absolute;
  top: 0;
  width: 280px;
  height: 40px;
  border-radius: 30px;
  background: rgba(10, 14, 18, 0.85);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: default;
  backdrop-filter: blur(10px);
}

/* Hover & Forced JS Expansion */
.pw-strength-pill:hover,
.pw-strength-pill.force-expand {
  height: 150px; 
  width: 440px; 
  border-radius: 16px;
  background: rgba(10, 14, 18, 0.98);
}

/* ─── COLOR STATES ─── */
.pill-silver { border-color: rgba(226,232,240,0.2); box-shadow: 0 0 6px rgba(226,232,240,0.05); color: var(--c-silver); }
.pw-strength-pill.pill-silver:hover, .pw-strength-pill.pill-silver.force-expand { border-color: rgba(226,232,240,0.6); box-shadow: 0 0 12px rgba(226,232,240,0.15), 0 10px 30px rgba(0,0,0,0.6); }

.pill-red { border-color: rgba(229,107,107,0.3); box-shadow: 0 0 6px rgba(229,107,107,0.1); color: var(--c-red); }
.pw-strength-pill.pill-red:hover, .pw-strength-pill.pill-red.force-expand { border-color: rgba(229,107,107,0.8); box-shadow: 0 0 12px rgba(229,107,107,0.2), 0 10px 30px rgba(0,0,0,0.6); }

.pill-orange { border-color: rgba(245,166,35,0.3); box-shadow: 0 0 6px rgba(245,166,35,0.1); color: var(--c-orange); }
.pw-strength-pill.pill-orange:hover, .pw-strength-pill.pill-orange.force-expand { border-color: rgba(245,166,35,0.8); box-shadow: 0 0 12px rgba(245,166,35,0.2), 0 10px 30px rgba(0,0,0,0.6); }

.pill-green { border-color: rgba(40,171,100,0.3); box-shadow: 0 0 6px rgba(40,171,100,0.1); color: var(--c-green); }
.pw-strength-pill.pill-green:hover, .pw-strength-pill.pill-green.force-expand { border-color: rgba(40,171,100,0.8); box-shadow: 0 0 12px rgba(40,171,100,0.2), 0 10px 30px rgba(0,0,0,0.6); }

/* ─── PILL INTERNALS ─── */
.pill-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; 
  height: 40px;
  width: 100%;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  
  /* The winning formula: 2px blur at exactly 45% opacity of the current color */
  filter: drop-shadow(0 0 2px color-mix(in srgb, currentColor 45%, transparent));
  
  /* Kill the old text-only shadow to prevent double-glowing */
  text-shadow: none; 
}

/* ─── NEW SVG PILL ICON ─── */
.pill-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  
  /* Remove individual shadow so it perfectly inherits the wrapper's unified glow */
  filter: none; 
}

.pill-content {
  padding: 10px 30px 20px 30px;
  width: 100%;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  gap: 12px 20px; /* Vertical and horizontal spacing */
}

.pw-strength-pill:hover .pill-content,
.pw-strength-pill.force-expand .pill-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s; 
}

/* Checklist items */
.pw-info-req { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  color: rgba(200, 192, 176, 0.5); 
  font-family: 'JetBrains Mono', monospace; 
  font-size: 14px; 
  font-weight: 500;
  transition: all 0.3s ease; 
}
.pw-info-req:last-child {
  grid-column: span 2;
  justify-content: center;
}
.pw-info-req::before { content: '✕'; font-size: 16px; color: rgba(229, 107, 107, 0.8); transition: all 0.3s ease; }
.pw-info-req.met { color: var(--text); }
.pw-info-req.met::before { content: '✓'; color: var(--c-green); text-shadow: 0 0 12px rgba(40, 171, 100, 0.6); }

/* Password Confirm Checkmark */
.match-icon { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: bold; transition: all 0.3s; opacity: 0; pointer-events: none; }
.match-icon.valid { color: var(--c-green); opacity: 1; text-shadow: 0 0 8px rgba(40, 171, 100, 0.5); }
.match-icon.invalid { color: var(--c-red); opacity: 1; text-shadow: 0 0 8px rgba(229, 107, 107, 0.5); }

/* ─── STANDALONE CORNER BUTTON ─── */
.nb-btn { 
  position: absolute; 
  top: -70px; /* Perfectly aligned to the top-left of the glass card padding */
  left: -40px; 
  width: 52px; 
  height: 52px; 
  border-radius: 16px; /* Smooth corners like create-profile */
  border: 1px solid rgba(255,255,255,0.03); 
  outline: none; 
  background: rgba(9,12,16,0.6); 
  color: var(--text-dim); 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), inset 0 0 0 1.5px var(--glass-border);
  z-index: 1000; /* Ensures it's always on top and clickable */
  isolation: isolate;
}

.nb-btn svg { 
  width: 24px; 
  height: 24px; 
  fill: none; 
  stroke: currentColor; 
  stroke-width: 2.5; 
  stroke-linecap: round; 
  stroke-linejoin: round; 
}

/* Return Silver Variant */
.nb-btn.return:hover { 
  color: var(--c-silver); 
  background: rgba(9,12,16,0.85); 
  box-shadow: inset 0 0 0 1.5px var(--c-silver), 0 0 20px rgba(226,232,240,0.2); 
}

/* Decline Red Variant (Matches Logout Button) */
.nb-btn.decline:hover { 
  color: #cc6060; 
  background: rgba(9,12,16,0.85); 
  box-shadow: inset 0 0 0 1.5px rgba(204,96,96,0.4), 0 0 20px rgba(204,96,96,0.15); 
}

/* ─── FORGOT PASSWORD LINK ─── */
.text-link { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.text-link.red-link { color: rgba(229, 107, 107, 0.7); }
.text-link.red-link:hover { color: var(--c-red); border-bottom-color: var(--c-red); text-shadow: 0 0 8px rgba(229, 107, 107, 0.4); }

/* ─── DIGIT BOXES ─── */
.digit-group { display: flex; gap: 12px; justify-content: center; width: 100%; margin-bottom: 25px; }
.digit-box { width: 55px; height: 65px; background: rgba(5, 8, 12, 0.6); border: 1px solid var(--glass-border); border-radius: 12px; color: #fff; font-family: 'Barlow', sans-serif; font-size: 30px; text-align: center; outline: none; transition: all 0.3s ease; box-shadow: inset 0 4px 12px rgba(0,0,0,0.5); font-weight: 600; color-scheme: dark;}
.digit-box:focus { border-color: var(--c-green); background: rgba(5, 8, 12, 0.9); box-shadow: inset 0 4px 15px rgba(0,0,0,0.9), 0 0 15px rgba(40, 171, 100, 0.2); }
.digit-box.focus-red:focus { border-color: var(--c-red); box-shadow: inset 0 4px 15px rgba(0,0,0,0.9), 0 0 15px rgba(229, 107, 107, 0.2); }

/* ─── GLOBAL BUTTON SYNC ─── */
.btn-main {
  position: relative; 
  width: 85%; 
  height: 60px; 
  margin: 0 auto; /* <--- This forces perfect center alignment */
  border-radius: 40px; 
  border: 1.5px solid rgba(255, 255, 255, 0.05); outline: none;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 18px; letter-spacing: 2px; text-transform: uppercase; 
  background: rgba(10, 10, 10, 0.5); color: rgba(122, 112, 96, 0.2); 
  box-shadow: 0 8px 20px rgba(0,0,0,0.6); transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-arrow { position: absolute; right: 24px; top: 50%; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateY(-50%) translateX(-15px); transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn-main:disabled { cursor: not-allowed; opacity: 0.6; }
.btn-main:not(:disabled):hover .btn-arrow { opacity: 1; transform: translateY(-50%) translateX(0); }

.btn-main.orange:not(:disabled) { color: rgba(245, 166, 35, 0.7); border-color: rgba(245, 166, 35, 0.2); }
.btn-main.orange:not(:disabled):hover { color: var(--c-orange); background: rgba(245, 166, 35, 0.08); border-color: rgba(245, 166, 35, 0.6); box-shadow: 0 0 24px rgba(245, 166, 35, 0.2), 0 8px 20px rgba(0,0,0,0.6); text-shadow: 0 0 12px rgba(245, 166, 35, 0.5); }

.btn-main.silver:not(:disabled) { color: rgba(225, 225, 225, 0.65); border-color: rgba(255, 255, 255, 0.1); }
.btn-main.silver:not(:disabled):hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 24px rgba(255, 255, 255, 0.15), 0 8px 20px rgba(0,0,0,0.6); text-shadow: 0 0 12px rgba(255, 255, 255, 0.5); }

.btn-main.cyan:not(:disabled) { color: rgba(11, 198, 227, 0.7); border-color: rgba(11, 198, 227, 0.2); }
.btn-main.cyan:not(:disabled):hover { color: var(--c-cyan); background: rgba(11, 198, 227, 0.08); border-color: rgba(11, 198, 227, 0.6); box-shadow: 0 0 24px rgba(11, 198, 227, 0.2), 0 8px 20px rgba(0,0,0,0.6); text-shadow: 0 0 12px rgba(11, 198, 227, 0.5); }

.btn-main.green:not(:disabled) { color: rgba(40, 171, 100, 0.7); border-color: rgba(40, 171, 100, 0.2); }
.btn-main.green:not(:disabled):hover { color: var(--c-green); background: rgba(40, 171, 100, 0.08); border-color: rgba(40, 171, 100, 0.6); box-shadow: 0 0 24px rgba(40, 171, 100, 0.2), 0 8px 20px rgba(0,0,0,0.6); text-shadow: 0 0 12px rgba(40, 171, 100, 0.5); }

.btn-main.red:not(:disabled) { color: rgba(229, 107, 107, 0.7); border-color: rgba(229, 107, 107, 0.2); }
.btn-main.red:not(:disabled):hover { color: var(--c-red); background: rgba(229, 107, 107, 0.08); border-color: rgba(229, 107, 107, 0.6); box-shadow: 0 0 24px rgba(229, 107, 107, 0.2), 0 8px 20px rgba(0,0,0,0.6); text-shadow: 0 0 12px rgba(229, 107, 107, 0.5); }

.btn-main.purple:not(:disabled) { color: rgba(155, 109, 255, 0.7); border-color: rgba(155, 109, 255, 0.2); }
.btn-main.purple:not(:disabled):hover { color: var(--c-purple); background: rgba(155, 109, 255, 0.08); border-color: rgba(155, 109, 255, 0.6); box-shadow: 0 0 24px rgba(155, 109, 255, 0.2), 0 8px 20px rgba(0,0,0,0.6); text-shadow: 0 0 12px rgba(155, 109, 255, 0.5); }

/* ─── SCALED UP POLICIES TYPOGRAPHY ─── */
.pol-scroll { width: 100%; height: 310px; overflow-y: auto; text-align: left; padding-right: 15px; margin-top: 15px; scrollbar-width: thin; scrollbar-color: rgba(200, 170, 110, 0.5) transparent; }
.pol-scroll::-webkit-scrollbar { width: 6px; }
.pol-scroll::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
.pol-scroll::-webkit-scrollbar-thumb { background: rgba(200, 170, 110, 0.5); border-radius: 10px; }
.pol-scroll::-webkit-scrollbar-thumb:hover { background: rgba(200, 170, 110, 1); box-shadow: 0 0 10px rgba(200, 170, 110, 0.8); }

.pol-title { font-family: 'Cinzel', serif; font-size: 26px; color: var(--accent); letter-spacing: 2px; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--accent-dim); }
.pol-subtitle { font-family: 'Barlow', sans-serif; font-size: 18px; font-weight: 600; color: var(--accent); letter-spacing: 1.5px; text-transform: uppercase; margin: 28px 0 10px; }
.pol-subtitle.first { margin-top: 0; }
.pol-text { font-family: 'Barlow', sans-serif; font-size: 16px; line-height: 1.7; color: rgba(200, 192, 176, 0.9); margin-bottom: 14px; }
.pol-list { font-family: 'Barlow', sans-serif; font-size: 16px; line-height: 1.7; color: var(--text-dim); margin-top: 6px; margin-bottom: 18px; padding-left: 24px; }
.pol-list li { margin-bottom: 8px; }

/* ─── LEGAL FOOTER ─── */
.legal-footer { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 2px; color: rgba(200, 192, 176, 0.4); text-transform: uppercase; cursor: help; z-index: 20; transition: color 0.3s ease; width: 100%; text-align: center; }
.legal-footer:hover { color: rgba(200, 192, 176, 0.9); }
.legal-tooltip { position: absolute; bottom: calc(100% + 15px); left: 50%; transform: translateX(-50%) translateY(10px); width: 320px; background: rgba(9, 12, 16, 0.95); border: 1px solid var(--glass-border); border-radius: 8px; padding: 12px 16px; color: var(--text); font-family: 'Barlow', sans-serif; font-size: 11px; line-height: 1.4; text-align: center; letter-spacing: 0.5px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1); pointer-events: none; z-index: 100; text-transform: none; font-weight: normal; }
.legal-footer:hover .legal-tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.legal-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px; border-width: 6px; border-style: solid; border-color: rgba(9, 12, 16, 0.95) transparent transparent transparent; }

/* ─── NEW ERROR UX (Red Placeholders) ─── */
.app-input.error::placeholder {
  color: rgba(229, 107, 107, 0.85) !important;
  opacity: 1;
}

#inner-header-sub {
  pointer-events: none; /* Allows clicks to pass through to the button */
}

#inner-header-text {
  pointer-events: auto;
}

/* ─── AUTOFILL OVERRIDE ─── */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  /* Use a massive inset box-shadow to "paint" over the yellow */
  -webkit-box-shadow: 0 0 0 1000px rgba(5, 8, 12, 1) inset !important;
  /* Force the text color back to white/silver */
  -webkit-text-fill-color: #ffffff !important;
  /* Match your transition speed so it doesn't "flash" yellow on load */
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── PASSWORD INPUT UPGRADES ─── */

/* 1. NUCLEAR GHOST EYE KILLER (For Chrome/Edge) */
input::-ms-reveal, input::-ms-clear, input::-webkit-reveal, input::-webkit-credentials-auto-fill-button, input::-webkit-contacts-auto-fill-button { 
  display: none !important; width: 0 !important; height: 0 !important; 
}

/* 2. THE WATERFOX BYPASS & CENTERING MATH */
/* By using .mask-password on a type="text" input, we completely bypass Waterfox's native eye! */
.mask-password {
  -webkit-text-security: disc !important;
}

.app-input[type="password"], .app-input.pw-text-glow, .mask-password {
  font-family: 'JetBrains Mono', monospace !important;
  text-align: center !important;
  text-indent: 0 !important; 
  padding-left: 60px !important; 
  padding-right: 60px !important; 
}

/* Typing state: Bumps font size to 24px to make dots bigger, plus the centering math */
.app-input[type="password"]:not(:placeholder-shown), 
.app-input.pw-text-glow:not(:placeholder-shown),
.mask-password:not(:placeholder-shown) {
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.25) !important;
  letter-spacing: 6px !important;
  padding-left: 66px !important; 
  padding-right: 60px !important;
  font-size: 24px !important; /* <--- THIS MAKES THE DOTS BIGGER */
}

/* Restores normal spacing and size to the placeholder text */
.app-input::placeholder {
  letter-spacing: 1px !important;
  text-indent: 0 !important;
  font-size: 17px !important; /* <--- Keeps "Create Password" normal size */
}

/* 3. Left-Aligned Eye Icon Base */
.pw-toggle-eye {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: 20px;
  height: 20px;
  color: rgba(200, 192, 176, 0.5); 
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
  opacity: 1; 
}

/* 4. Auto-hide the eye if the input is empty */
.app-input:placeholder-shown + .pw-toggle-eye {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

.pw-toggle-eye:hover {
  color: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)); 
}
