/* ============================================================
   Musoni Download Portal — Cyber Theme
   ============================================================ */
:root {
  --bg-void: #05070d;
  --bg-panel: #0b0f1a;
  --bg-panel-2: #0f1524;
  --neon-cyan: #00f6ff;
  --neon-magenta: #ff2ee6;
  --neon-green: #39ff88;
  --neon-orange: #ff6b00;
  --text-main: #d9f7ff;
  --text-dim: #7a8aa0;
  --danger: #ff3b5c;
  --border-glow: rgba(0, 246, 255, 0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #0b1524 0%, #05070d 45%, #030407 100%);
  color: var(--text-main);
  font-family: 'Consolas', 'Courier New', ui-monospace, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  position: relative;
}

/* Animated grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 246, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 246, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: gridMove 18s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 42px 42px; }
}

/* Scanline flicker overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 2px,
    transparent 4px
  );
  z-index: 1;
}

.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  padding: 36px 32px 30px;
  box-shadow:
    0 0 25px rgba(0, 246, 255, 0.15),
    0 0 80px rgba(255, 46, 230, 0.08),
    inset 0 0 40px rgba(0, 246, 255, 0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  /* background: conic-gradient(from 180deg, var(--neon-cyan), var(--neon-magenta), var(--neon-orange), var(--neon-cyan)); */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #05070d;
  box-shadow: 0 0 18px var(--neon-cyan);
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.brand-name {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.brand-sub {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: 0 0 10px var(--border-glow);
}

h1 {
  font-size: 20px;
  margin: 22px 0 4px;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 246, 255, 0.5);
  letter-spacing: 0.5px;
}

.tagline {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 26px;
  line-height: 1.5;
}

.app-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 246, 255, 0.05);
  border: 1px dashed var(--border-glow);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
}

.app-label-text {
  font-size: 14px;
  color: var(--text-main);
}

.app-label-version {
  font-weight: 700;
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(57, 255, 136, 0.5);
}

.btn {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #0091ff);
  color: #04121a;
  box-shadow: 0 0 20px rgba(0, 246, 255, 0.45);
}

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--text-dim);
  margin-top: 10px;
}
.btn-ghost:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

.footnote {
  margin-top: 22px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.6;
}

.footnote .lock {
  color: var(--neon-green);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 7, 0.82);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.modal-overlay.open { display: flex; }

.modal {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--neon-cyan);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 0 40px rgba(0, 246, 255, 0.25);
  animation: modalIn 0.18s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h2 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--neon-magenta);
  text-shadow: 0 0 10px rgba(255, 46, 230, 0.5);
}

.modal p.sub {
  margin: 0 0 20px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field label .req { color: var(--danger); }

.field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 246, 255, 0.25);
  background: #060a12;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 246, 255, 0.12);
}

.field input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.15);
}

.field.code input {
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--neon-green);
}

.msg {
  font-size: 12.5px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: none;
}

.msg.show { display: block; }

.msg.error {
  background: rgba(255, 59, 92, 0.1);
  border: 1px solid rgba(255, 59, 92, 0.4);
  color: #ff8fa3;
}

.msg.success {
  background: rgba(57, 255, 136, 0.08);
  border: 1px solid rgba(57, 255, 136, 0.4);
  color: var(--neon-green);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn { margin-top: 0; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(4, 18, 26, 0.3);
  border-top-color: #04121a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .card { padding: 28px 20px 24px; }
}
