/* ===== RESET & VARS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ---- Brand palette: Cyberpunk HUD Terminal — purple/cyan neon grid tunnel, angular glass panels ---- */
  --void:   #05030C;
  --panel:  rgba(16, 10, 32, 0.58);
  --panel-hi: rgba(24, 14, 46, 0.72);

  --pink:        #FF3DAF;
  --pink-bright: #FF8CD9;
  --cyan:        #3DE0FF;
  --cyan-bright: #9DF3FF;
  --purple:      #7B2FF7;

  --text:  #EEF2FF;
  --muted: #9FA8C9;
  --dim:   #5C6485;

  --border:      rgba(61, 224, 255, 0.45);
  --border-pink: rgba(255, 61, 175, 0.4);

  --grad-hud: linear-gradient(115deg, #FF3DAF 0%, #B14DFF 50%, #3DE0FF 100%);

  --cut: 14px;
  --font-display: 'Prompt', sans-serif;
  --container-sm: 400px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', sans-serif;
  background-color: #0B0618;
  color: var(--text);
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 88px;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* ===== BACKGROUND LAYER ===== */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('assets/bg.webp');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,3,12,0.55) 0%, rgba(5,3,12,0.1) 24%, rgba(5,3,12,0.35) 60%, rgba(5,3,12,0.85) 100%);
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  width: 34px;
  height: 34px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  border: 1px solid var(--cyan);
  background: rgba(11, 6, 24, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-shadow: 0 0 14px rgba(61,224,255,0.35);
}
.lang-btn svg { width: 100%; height: 100%; }

/* ===== HUD PANEL (login form) ===== */
.center-stage {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.1rem;
  position: relative;
  z-index: 2;
}

.hud-panel {
  width: 100%;
  max-width: var(--container-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.75rem 1.5rem 1.6rem;
  box-shadow: 0 0 0 1px rgba(255,61,175,0.12), 0 24px 60px rgba(5,3,12,0.6);
  position: relative;
}
.hud-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-hud);
  opacity: 0.05;
  pointer-events: none;
}

.hud-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin-bottom: 0.9rem;
}
.hud-tag .blip {
  width: 6px; height: 6px; background: var(--pink); border-radius: 50%;
  box-shadow: 0 0 8px var(--pink);
  animation: blip 1.4s ease-in-out infinite;
}
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.login-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad-hud);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}

.hud-panel form { width: 100%; }
.field {
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
}
.field label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  background: rgba(5, 3, 12, 0.55);
  border: 1px solid var(--border-pink);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  padding: 0.8rem 1rem;
}
.field-input:focus-within { border-color: var(--cyan); }
.field-input svg { flex-shrink: 0; color: var(--cyan-bright); width: 16px; height: 16px; }
.field-input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: 'Prompt', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.field-input input::placeholder { color: var(--dim); }

.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--grad-hud);
  color: #0B0618;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.2rem;
  border: none;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 24px rgba(255,61,175,0.4);
  margin-top: 0.5rem;
  transition: filter 0.2s ease;
}
.btn-login:hover:not(:disabled) { filter: brightness(1.12); }
.btn-login svg { width: 17px; height: 17px; }
.btn-login:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.hud-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.25rem 0 1rem;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.hud-divider::before,
.hud-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.hud-row {
  display: flex;
  gap: 0.6rem;
}
.hud-row a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.65rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--cyan-bright);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.hud-row a.line-connect {
  border-color: rgba(6,199,85,0.5);
  color: #6CFFAE;
}
.hud-row .ico-line {
  display: inline-flex; align-items: center; justify-content: center;
  background: #06C755; color: #fff; font-size: 0.55rem; font-weight: 800;
  letter-spacing: 0.02em; border-radius: 3px; padding: 1px 5px; line-height: 1.3;
}

/* ===== ABOUT TEXT ===== */
.about-text {
  position: relative;
  z-index: 2;
  max-width: var(--container-sm);
  margin: 0.5rem auto 0;
  padding: 0 1.1rem 1.5rem;
  text-align: center;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin-bottom: 0.5rem;
}
.about-text p {
  font-size: 0.74rem;
  line-height: 1.85;
  color: var(--muted);
}

/* ===== BOTTOM NAV — segmented angular bar ===== */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  width: calc(100% - 1.2rem);
  max-width: var(--container-sm);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(5,3,12,0.7);
  border: 1px solid var(--border);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  padding: 0.5rem 0.3rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dim);
  padding: 0.35rem 0.15rem;
  background: none;
  border-left: 1px solid var(--border-pink);
}
.bn-item:first-child { border-left: none; }
.bn-item svg { width: 18px; height: 18px; color: var(--dim); }
.bn-item.active,
.bn-item:hover { color: var(--cyan-bright); }
.bn-item.active svg,
.bn-item:hover svg { color: var(--pink-bright); filter: drop-shadow(0 0 6px rgba(255,61,175,0.6)); }

/* ===== HOW-TO MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 3, 12, 0.82);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-sheet {
  width: 100%;
  max-width: var(--container-sm);
  background: var(--panel-hi);
  border: 1px solid var(--border);
  border-bottom: none;
  clip-path: polygon(20px 0, 100% 0, 100% 100%, 0 100%, 0 20px);
  padding: 1.5rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan-bright);
}
.modal-close {
  width: 28px; height: 28px;
  background: rgba(61,224,255,0.12); border: 1px solid var(--border);
  color: var(--text); font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
}
.modal-steps { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.modal-steps li { display: flex; gap: 0.75rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 24px; height: 24px;
  background: var(--grad-hud); color: #0B0618; font-weight: 800; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-steps p { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }
.modal-steps strong { color: var(--text); }
