/* ============================================
   AdNova - Midnight Aurora Design System v2
   Auth Pages: login, verify, twofa, blocked
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap");

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

:root {
  --bg:       #06030f;
  --bg2:      #0d0a1f;
  --glass:    rgba(255,255,255,0.03);
  --border:   rgba(255,255,255,0.07);
  --border-p: rgba(168,85,247,0.25);
  --purple:   #a855f7;
  --purple2:  #8b5cf6;
  --pink:     #ec4899;
  --blue:     #6366f1;
  --cyan:     #22d3ee;
  --green:    #10b981;
  --red:      #f87171;
  --txt:      #f0eeff;
  --txt2:     #9d93c8;
  --txt3:     #574f78;
  --grad:     linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad2:    linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Outfit", sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Aurora Orbs */
.aurora-orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(70px); }
.aurora-orb-1 { width: 55vw; height: 55vh; top: -15vh; left: -10vw; background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, rgba(139,92,246,0.1) 45%, transparent 70%); animation: orb1 16s ease-in-out infinite alternate; }
.aurora-orb-2 { width: 50vw; height: 50vh; bottom: -15vh; right: -10vw; background: radial-gradient(circle, rgba(236,72,153,0.18) 0%, rgba(168,85,247,0.08) 45%, transparent 70%); animation: orb2 20s ease-in-out infinite alternate; }
.aurora-orb-3 { width: 30vw; height: 30vh; top: 50%; left: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(34,211,238,0.07) 0%, transparent 70%); animation: orb3 12s ease-in-out infinite alternate; }
@keyframes orb1 { to { transform: translate(4vw,6vh) scale(1.15); } }
@keyframes orb2 { to { transform: translate(-4vw,-5vh) scale(1.1); } }
@keyframes orb3 { to { transform: translate(-46%,-54%) scale(1.3); } }

/* Grid dots */
body::before { content: ""; position: fixed; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 44px 44px; pointer-events: none; z-index: 0; }

/* Auth Container */
.auth-container { position: relative; z-index: 1; width: 100%; max-width: 460px; padding: 20px; animation: fadeUp 0.65s var(--bounce) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }

/* Logo */
.auth-logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; }
.logo-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; color: white; letter-spacing: -1px; box-shadow: 0 8px 28px rgba(139,92,246,0.55), 0 0 0 1px rgba(168,85,247,0.3); position: relative; flex-shrink: 0; }
.logo-mark::after { content: ""; position: absolute; inset: -6px; border-radius: 20px; background: var(--grad); opacity: 0.12; animation: logoPulse 3s ease-in-out infinite; }
@keyframes logoPulse { 0%,100% { transform: scale(1); opacity: 0.12; } 50% { transform: scale(1.12); opacity: 0.22; } }
.logo-text { font-size: 24px; font-weight: 900; letter-spacing: -0.8px; background: linear-gradient(135deg,#fff 0%,rgba(168,85,247,0.75) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Glass Card */
.glass-card { background: rgba(13,10,31,0.78); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); border: 1px solid rgba(255,255,255,0.07); border-radius: 28px; padding: 44px 40px; box-shadow: 0 0 0 1px rgba(139,92,246,0.05), 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07); position: relative; overflow: hidden; }
.glass-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(168,85,247,0.45), rgba(236,72,153,0.35), transparent); }

/* Auth Header */
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 28px; font-weight: 900; letter-spacing: -0.9px; margin-bottom: 8px; }
.auth-sub { font-size: 14px; color: var(--txt2); line-height: 1.6; }

/* Fields */
.field-group { margin-bottom: 16px; }
.field-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--txt3); margin-bottom: 8px; }
.field-wrap { position: relative; }
.field-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--txt3); pointer-events: none; transition: color 0.2s; z-index: 1; }
.field-wrap:focus-within .field-icon { color: var(--purple); }
.field-input { width: 100%; padding: 14px 44px; background: rgba(255,255,255,0.03); border: 1.5px solid rgba(255,255,255,0.07); border-radius: 14px; font-family: "Outfit", sans-serif; font-size: 15px; color: var(--txt); outline: none; transition: all 0.25s var(--ease); }
.field-input::placeholder { color: var(--txt3); }
.field-input:focus { border-color: rgba(168,85,247,0.5); background: rgba(168,85,247,0.04); box-shadow: 0 0 0 4px rgba(168,85,247,0.09); }
.field-input.valid { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.03); }
.field-input.error { border-color: rgba(248,113,113,0.5); background: rgba(248,113,113,0.04); animation: shake 0.35s ease; }
.field-check { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--green); opacity: 0; transition: opacity 0.2s; }
.field-check.show { opacity: 1; }
.eye-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--txt3); cursor: pointer; padding: 4px; line-height: 0; transition: color 0.2s; z-index: 1; }
.eye-btn:hover { color: var(--txt2); }
.field-error { display: block; font-size: 12px; font-weight: 600; color: #f87171; margin-top: 6px; min-height: 18px; opacity: 0; transition: opacity 0.2s; }
.field-error.show { opacity: 1; }

/* Remember */
.remember-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--txt2); cursor: pointer; user-select: none; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--purple); cursor: pointer; }

/* Submit Button */
.submit-btn { width: 100%; padding: 16px; border-radius: 14px; background: var(--grad); color: white; font-family: "Outfit", sans-serif; font-size: 16px; font-weight: 800; border: none; cursor: pointer; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 8px 32px rgba(139,92,246,0.5), 0 0 0 1px rgba(168,85,247,0.2); transition: all 0.3s var(--ease); letter-spacing: 0.3px; }
.submit-btn::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.6s ease; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(139,92,246,0.6), 0 0 0 1px rgba(168,85,247,0.3); }
.submit-btn:hover::before { left: 100%; }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn-text.hide { display: none; }
.btn-arrow.hide { display: none; }
#btnLoader { display: none; }
#btnLoader.show { display: flex; align-items: center; }
.loader-spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.25); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* Success Overlay */
.success-overlay { position: fixed; inset: 0; background: rgba(6,3,15,0.92); backdrop-filter: blur(16px); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.success-overlay.show { opacity: 1; pointer-events: all; }
.success-card { text-align: center; padding: 56px 44px; background: rgba(13,10,31,0.9); border: 1px solid rgba(168,85,247,0.18); border-radius: 32px; backdrop-filter: blur(24px); max-width: 380px; width: calc(100% - 40px); animation: popIn 0.45s var(--bounce) both; }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-icon-wrap { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05)); border: 2px solid rgba(16,185,129,0.4); box-shadow: 0 0 32px rgba(16,185,129,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 34px; }
.success-card h2 { font-size: 28px; font-weight: 900; letter-spacing: -0.8px; margin-bottom: 10px; }
.success-card p { font-size: 15px; color: var(--txt2); margin-bottom: 32px; }
.success-progress { width: 100%; height: 3px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
#progressBar { height: 100%; width: 0%; background: var(--grad); border-radius: 2px; transition: width 2s linear; }

/* Verify elements */
.code-section { margin: 28px 0; text-align: center; }
.code-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--txt3); margin-bottom: 16px; }
.code-boxes { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.code-box { width: 52px; height: 60px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: var(--txt); transition: all 0.2s; }
.code-box.filled { border-color: rgba(168,85,247,0.45); background: rgba(168,85,247,0.06); color: var(--purple); box-shadow: 0 0 12px rgba(168,85,247,0.2); }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--txt2); font-family: "Outfit", sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.copy-btn:hover { background: rgba(168,85,247,0.08); border-color: var(--border-p); color: var(--purple); }
.verify-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.verify-step { display: flex; align-items: flex-start; gap: 14px; font-size: 14px; color: var(--txt2); line-height: 1.5; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: white; flex-shrink: 0; }
.bot-link { color: var(--purple); text-decoration: none; font-weight: 700; }
.bot-link:hover { color: var(--pink); }
.verify-status-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); font-size: 14px; color: var(--txt2); }
.status-spinner { width: 14px; height: 14px; border: 2px solid rgba(168,85,247,0.2); border-top-color: var(--purple); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }

/* Blocked page */
.blocked-icon { width: 88px; height: 88px; border-radius: 50%; background: rgba(248,113,113,0.08); border: 2px solid rgba(248,113,113,0.25); box-shadow: 0 0 40px rgba(248,113,113,0.15); display: flex; align-items: center; justify-content: center; margin: 0 auto 28px; animation: blockPulse 3s ease-in-out infinite; }
@keyframes blockPulse { 0%,100% { box-shadow: 0 0 40px rgba(248,113,113,0.15); } 50% { box-shadow: 0 0 60px rgba(248,113,113,0.3); } }
.blocked-title { font-size: 30px; font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; color: #f87171; }
.blocked-reason { padding: 14px 18px; border-radius: 12px; background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); font-size: 14px; color: var(--txt2); line-height: 1.6; margin-bottom: 16px; text-align: left; }
.blocked-duration { font-size: 13px; color: var(--txt3); margin-bottom: 28px; }
.blocked-logout-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 14px; background: rgba(248,113,113,0.08); border: 1.5px solid rgba(248,113,113,0.25); color: #f87171; font-family: "Outfit", sans-serif; font-size: 15px; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.blocked-logout-btn:hover { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.4); transform: translateY(-1px); }

/* ── Telegram-only login page styles ── */

.tg-brand-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(42,171,238,0.12); border: 2px solid rgba(42,171,238,0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 32px rgba(42,171,238,0.18);
  animation: tgPulse 3s ease-in-out infinite;
}
@keyframes tgPulse { 0%,100% { box-shadow: 0 0 32px rgba(42,171,238,0.18); } 50% { box-shadow: 0 0 52px rgba(42,171,238,0.35); } }

/* Code display */
.code-display-wrap {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 24px 0 10px;
}
.code-display {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(42,171,238,0.07); border: 1.5px solid rgba(42,171,238,0.25);
  border-radius: 16px; padding: 16px 24px; min-height: 64px; flex: 1;
  box-shadow: 0 4px 24px rgba(42,171,238,0.1);
}
.code-loader { display: flex; align-items: center; justify-content: center; }
.code-char {
  font-size: 28px; font-weight: 900; font-family: 'Courier New', monospace;
  color: #2AABEE; letter-spacing: 2px;
  animation: charPop 0.4s var(--bounce) both;
}
.code-char:nth-child(1) { animation-delay: 0.05s; }
.code-char:nth-child(2) { animation-delay: 0.10s; }
.code-char:nth-child(3) { animation-delay: 0.15s; }
.code-char:nth-child(4) { animation-delay: 0.20s; }
.code-char:nth-child(5) { animation-delay: 0.25s; }
.code-char:nth-child(6) { animation-delay: 0.30s; }
.code-char:nth-child(7) { animation-delay: 0.35s; }
.code-char:nth-child(8) { animation-delay: 0.40s; }
@keyframes charPop { from { opacity:0; transform:scale(0.5) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }

.code-refresh-btn {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08);
  color: var(--txt3); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.code-refresh-btn:hover { color: var(--txt2); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }

/* Timer bar */
.code-timer-wrap { margin-bottom: 24px; }
.code-timer-bar { height: 3px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.code-timer-progress { height: 100%; width: 100%; background: linear-gradient(90deg, #1a8fbf, #2AABEE); border-radius: 2px; transition: width 1s linear; }
.code-timer-label { font-size: 11px; font-weight: 700; color: var(--txt3); display: block; text-align: right; }

/* Steps */
.login-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.login-step { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--txt2); }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: rgba(42,171,238,0.15); border: 1.5px solid rgba(42,171,238,0.3);
  color: #2AABEE; font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.step-text strong { color: var(--txt); font-weight: 800; }

/* Open bot button */
.open-bot-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px; border-radius: 14px;
  background: linear-gradient(135deg, #1a8fbf, #2AABEE);
  color: white; font-family: "Outfit", sans-serif; font-size: 15px; font-weight: 800;
  text-decoration: none; margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(42,171,238,0.4);
  transition: all 0.25s var(--ease);
}
.open-bot-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(42,171,238,0.5); }
.open-bot-btn:active { transform: translateY(0); }

/* Status */
.code-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--txt3); font-weight: 600;
}
.status-dot-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #2AABEE; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(42,171,238,0.6);
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.4; transform:scale(0.7); } }

.code-expired-btn {
  padding: 8px 20px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(42,171,238,0.15); color: #2AABEE;
  font-family: "Outfit",sans-serif; font-size: 14px; font-weight: 800;
  transition: all 0.2s;
}
.code-expired-btn:hover { background: rgba(42,171,238,0.25); }

.bot-link { color: #2AABEE; text-decoration: none; font-weight: 700; }
.bot-link:hover { text-decoration: underline; }

/* Clickable code hover */
.code-display:hover {
  border-color: rgba(42,171,238,0.5);
  background: rgba(42,171,238,0.12);
  box-shadow: 0 4px 28px rgba(42,171,238,0.2);
}

/* Copy toast */
.copy-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: rgba(16,185,129,0.95); backdrop-filter: blur(12px);
  color: white; font-family: "Outfit", sans-serif; font-size: 14px; font-weight: 700;
  padding: 10px 20px; border-radius: 12px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(16,185,129,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobile */
@media (max-width: 480px) {
  .glass-card { padding: 28px 20px; border-radius: 24px; }
  .auth-title { font-size: 22px; }
  body { align-items: flex-start; padding-top: 20px; overflow-y: auto; }
  .code-char { font-size: 22px; }
}

/* ── Autofill fix (white background override) ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(20, 15, 45, 0.98) inset !important;
  -webkit-text-fill-color: #f0eeff !important;
  border-color: rgba(168,85,247,0.3) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* ── Logo stronger visibility ── */
.auth-logo {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: center !important;
  margin-bottom: 20px !important;
}

.logo-mark {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  color: white !important;
  letter-spacing: -1px !important;
  box-shadow: 0 8px 28px rgba(139,92,246,0.55), 0 0 0 1px rgba(168,85,247,0.35) !important;
  flex-shrink: 0 !important;
  min-width: 48px !important;
}

.logo-text {
  font-size: 24px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #ffffff 0%, #c084fc 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── Make glass card more solid ── */
.glass-card {
  background: rgba(16, 12, 38, 0.88) !important;
}

/* ── Aurora orbs stronger ── */
.aurora-orb-1 {
  opacity: 1 !important;
  background: radial-gradient(circle, rgba(99,102,241,0.32) 0%, rgba(139,92,246,0.16) 45%, transparent 70%) !important;
}

.aurora-orb-2 {
  opacity: 1 !important;
  background: radial-gradient(circle, rgba(236,72,153,0.28) 0%, rgba(168,85,247,0.12) 45%, transparent 70%) !important;
}

/* ── Field input: force dark bg even without autofill ── */
.field-input {
  background: rgba(255,255,255,0.05) !important;
  color: #f0eeff !important;
  -webkit-text-fill-color: #f0eeff !important;
}