/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --green:   #00ff41;
  --green2:  #00cc33;
  --red:     #c0152a;
  --gold:    #c9973a;
  --bg:      #000000;
  --bg2:     #050a05;
  --mono:    'Share Tech Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
  --ui:      'Rajdhani', sans-serif;
}

html, body {
  min-height: 100vh; width: 100%;
  background: var(--bg);
  color: var(--green);
  font-family: var(--mono);
  overflow-x: hidden;
}

/* ── BG EFFECTS ── */
#matrix { position: fixed; inset: 0; z-index: 0; opacity: 0.15; pointer-events: none; }
.scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, #00000020 2px, #00000020 4px);
}
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 85% 85% at 50% 50%, transparent 40%, #000000dd 100%);
}

/* ── BOOT SCREEN ── */
#bootScreen {
  position: fixed; inset: 0; z-index: 50;
  background: #000;
  display: flex; flex-direction: column;
  padding: clamp(14px, 4vw, 28px);
  overflow: hidden;
}

.boot-topbar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: clamp(0.45rem, 1.5vw, 0.6rem);
  letter-spacing: 0.15em;
  color: var(--green2);
  border-bottom: 1px solid #00ff4120;
  padding-bottom: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap; gap: 6px;
}

.boot-body { flex: 1; overflow: hidden; position: relative; }

.boot-lines {
  height: 100%;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: none;
}
.boot-lines::-webkit-scrollbar { display: none; }

.boot-line {
  font-size: clamp(0.5rem, 1.8vw, 0.65rem);
  line-height: 1.5;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s;
}
.boot-ok   { color: var(--green); }
.boot-warn { color: var(--gold); }
.boot-dim  { color: #004a18; }

.boot-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--green);
  animation: blink 0.7s step-end infinite;
  vertical-align: middle; margin-top: 4px;
}

.boot-bottom { margin-top: 16px; }
.boot-progress-label {
  display: flex; justify-content: space-between;
  font-size: clamp(0.48rem, 1.5vw, 0.6rem);
  letter-spacing: 0.2em; color: var(--green2);
  margin-bottom: 6px;
}
.boot-bar { height: 3px; background: #00ff4115; border-radius: 2px; overflow: hidden; }
.boot-bar-fill {
  height: 100%; background: var(--green); width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--green);
}

/* ── CONNECTING SCREEN ── */
#connectScreen {
  position: fixed; inset: 0; z-index: 45;
  background: #000;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}

.conn-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  width: 100%; max-width: 360px;
}

.conn-title {
  font-size: clamp(0.5rem, 2vw, 0.65rem);
  letter-spacing: 0.3em; color: var(--green2);
  text-align: center;
}

#connCanvas { display: block; }

.conn-steps { width: 100%; }
.conn-step {
  display: flex; justify-content: space-between;
  font-size: clamp(0.5rem, 1.8vw, 0.62rem);
  letter-spacing: 0.1em;
  padding: 5px 0;
  border-bottom: 1px solid #00ff4108;
  opacity: 0;
}
.conn-val { color: var(--green); }

.conn-bar-label {
  display: flex; justify-content: space-between; width: 100%;
  font-size: clamp(0.48rem, 1.5vw, 0.58rem);
  letter-spacing: 0.2em; color: var(--green2);
  margin-bottom: 6px;
}
.conn-bar { width: 100%; height: 2px; background: #00ff4115; border-radius: 1px; }
.conn-bar-fill {
  height: 100%; background: var(--green); width: 0%;
  transition: width 0.4s; box-shadow: 0 0 6px var(--green);
}

/* ── LOGIN SCREEN ── */
#loginScreen {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(20px, 5vw, 40px) clamp(14px, 4vw, 24px);
}

.login-inner {
  width: 100%;
  max-width: 440px;
  display: flex; flex-direction: column;
  align-items: center; gap: clamp(18px, 4vw, 28px);
}

/* ── LOGO ── */
.logo-block { text-align: center; animation: fadeDown 0.7s ease both; }

.eagle-wrap {
  position: relative; width: clamp(80px,18vw,110px); height: clamp(80px,18vw,110px);
  margin: 0 auto clamp(12px,3vw,18px);
}

.eagle-ring {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 1px solid var(--green);
  background: radial-gradient(circle, #030d03 40%, #000 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  box-shadow: 0 0 24px #00ff4128, inset 0 0 16px #000;
}

.eagle-ring2 {
  position: absolute; inset: 5px;
  border-radius: 50%;
  border: 1px solid #00ff4120;
}

.ring-orbit {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px dashed #00ff4118;
  animation: spin 10s linear infinite;
}

.eagle-icon { font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1; }

.org-name {
  font-family: var(--display);
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 0 30px #00ff4140, 0 2px 0 #001a00;
  line-height: 1;
  margin-bottom: clamp(6px,2vw,10px);
}

.org-sub {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  font-size: clamp(0.45rem, 1.5vw, 0.6rem);
  letter-spacing: 0.3em; color: #00ff4150;
  margin-bottom: clamp(6px,2vw,10px);
}
.star-deco { color: var(--gold); font-size: 0.5rem; }

.clearance {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: clamp(0.45rem, 1.5vw, 0.58rem);
  letter-spacing: 0.2em; color: var(--red);
  border: 1px solid #c0152a40;
  border-radius: 2px; padding: 4px 12px;
  background: #c0152a10;
}
.blink-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--red);
  animation: blink 1.2s step-end infinite;
}

/* ── FORM CARD ── */
.form-card {
  width: 100%;
  animation: fadeUp 0.7s 0.15s ease both;
  position: relative;
}

.form-card > * { position: relative; z-index: 1; }

.form-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #030d03 0%, #000508 100%);
  border: 1px solid #00ff4122;
  border-radius: 4px;
  box-shadow: 0 0 60px #00000099, 0 0 40px #00ff4108;
  z-index: 0;
}

.form-card-top-line {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), var(--gold), var(--green), transparent);
  z-index: 2;
}

.form-sep {
  display: flex; align-items: center; gap: 10px;
  padding: clamp(16px,4vw,24px) clamp(16px,4vw,24px) 0;
  margin-bottom: clamp(16px,4vw,22px);
}
.sep-line { flex: 1; height: 1px; background: #00ff4115; }
.sep-text { font-size: clamp(0.45rem,1.5vw,0.58rem); letter-spacing: 0.25em; color: #00ff4150; white-space: nowrap; }

/* ── FIELDS ── */
.field {
  padding: 0 clamp(16px,4vw,24px);
  margin-bottom: clamp(12px,3vw,18px);
}

.field-lbl {
  display: flex; align-items: center; gap: 6px;
  font-size: clamp(0.48rem,1.5vw,0.6rem);
  letter-spacing: 0.22em; color: #00ff4165;
  margin-bottom: 7px;
}
.field-arrow { color: var(--green); }

.field-inp {
  width: 100%;
  background: #000;
  border: 1px solid #00ff4122;
  border-radius: 2px;
  padding: clamp(10px,2.5vw,13px) clamp(12px,3vw,16px);
  font-family: var(--mono);
  font-size: clamp(0.82rem,2.5vw,0.95rem);
  color: var(--green);
  outline: none;
  caret-color: var(--green);
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-inp::placeholder { color: #00ff4120; }
.field-inp:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px #00ff4110;
}

/* ── ERROR ── */
.error-box {
  margin: 0 clamp(16px,4vw,24px) clamp(10px,3vw,14px);
  font-size: clamp(0.5rem,1.5vw,0.62rem);
  letter-spacing: 0.12em; color: var(--red);
  background: #c0152a10;
  border: 1px solid #c0152a40;
  border-radius: 2px; padding: 9px 12px;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.error-box.show { opacity: 1; transform: translateY(0); }

/* ── BUTTON ── */
.login-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: calc(100% - clamp(32px,8vw,48px));
  margin: 0 clamp(16px,4vw,24px);
  padding: clamp(12px,3vw,15px);
  background: transparent;
  border: 1px solid var(--green);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: clamp(0.65rem,2vw,0.8rem);
  letter-spacing: 0.25em; color: var(--green);
  cursor: pointer; overflow: hidden; position: relative;
  transition: all 0.2s;
  box-shadow: 0 0 14px #00ff4115;
}
.login-btn:hover, .login-btn:active {
  background: #00ff4108;
  box-shadow: 0 0 24px #00ff4130;
}
.btn-shine {
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, #00ff4115, transparent);
  transform: skewX(-20deg); transition: left 0.5s;
}
.login-btn:hover .btn-shine { left: 160%; }
.btn-arrow { opacity: 0.6; transition: transform 0.2s; }
.login-btn:hover .btn-arrow { transform: translateX(4px); }

/* ── FOOTER ── */
.form-footer {
  padding: clamp(14px,4vw,20px) clamp(16px,4vw,24px);
  font-size: clamp(0.4rem,1.2vw,0.5rem);
  letter-spacing: 0.1em; color: #00ff4125;
  text-align: center; line-height: 1.8;
}

/* ── BOTTOM MOTTO ── */
.bottom-motto {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(0.45rem,1.5vw,0.6rem);
  letter-spacing: 0.35em; color: #00ff4125;
  animation: fadeUp 0.7s 0.3s ease both;
}
.motto-text { color: #00ff4130; }

/* ── ANIMATIONS ── */
@keyframes fadeDown { from{opacity:0;transform:translateY(-14px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeUp   { from{opacity:0;transform:translateY(14px)}  to{opacity:1;transform:translateY(0)} }
@keyframes blink    { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes spin     { to{transform:rotate(360deg)} }

.form-card.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-6px)} 40%{transform:translateX(6px)}
  60%{transform:translateX(-4px)} 80%{transform:translateX(4px)}
}

/* ── RESPONSIVE TWEAKS ── */
@media (max-width: 480px) {
  .boot-topbar { font-size: 0.42rem; }
  .boot-line { font-size: 0.5rem; }
  .org-name { letter-spacing: 0.08em; }
}

@media (min-width: 768px) {
  #loginScreen { align-items: center; }
  .login-inner { max-width: 460px; }
}
