@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

/*══════════════════════════════════════════════════════
   HYPER MAN — AUTH SYSTEM v3
   Premium Futuristic Glassmorphism + Soft 3D
   Mobile-First • RTL • Android-App-Like
  ══════════════════════════════════════════════════════*/

:root {
  /* Core palette */
  --bg: #06080f;
  --bg2: #0a0e1a;
  --card-bg: rgba(10, 14, 26, 0.82);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-highlight: rgba(255, 255, 255, 0.03);
  --glass: rgba(255, 255, 255, 0.02);

  /* Accents */
  --accent: #06d6f0;
  --accent2: #00b4d8;
  --accent-glow: rgba(6, 214, 240, 0.15);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.12);
  --gold: #d4a574;
  --gold2: #c9955e;
  --gold3: #e8c9a0;
  --emerald: #10b981;
  --emerald2: #34d399;
  --rose: #f43f5e;

  /* Text */
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;

  /* Radii */
  --r: 14px;
  --r-sm: 10px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 80px var(--accent-glow);
  --shadow-purple: 0 0 60px var(--purple-glow);

  --font: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', 'Cairo', serif;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg2: #e2e8f0;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-highlight: rgba(255, 255, 255, 0.6);
  --glass: rgba(0, 0, 0, 0.02);
  --accent: #0891b2;
  --accent2: #0e7490;
  --accent-glow: rgba(8, 145, 178, 0.12);
  --purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.08);
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 80px rgba(8, 145, 178, 0.1);
  color-scheme: light;
}

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

html {
  height: 100%;
  font-size: clamp(14px, 1.15vw, 17px);
  -webkit-text-size-adjust: 100%;
}

body.hm-auth {
  min-height: 100dvh;
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  background: var(--bg);
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.25s;
}
a:hover {
  color: var(--accent2);
}

/*══════════════ ANIMATED BACKGROUND ══════════════*/
.hm-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hm-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}
.hm-orb--1 {
  width: min(650px, 70vw);
  height: min(650px, 70vw);
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, rgba(6, 214, 240, 0.18), transparent 70%);
  animation: orb1 22s ease-in-out infinite alternate;
  opacity: 0.5;
}
.hm-orb--2 {
  width: min(500px, 55vw);
  height: min(500px, 55vw);
  bottom: -18%;
  right: -8%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
  animation: orb2 18s ease-in-out infinite alternate;
  opacity: 0.4;
}
.hm-orb--3 {
  width: min(380px, 40vw);
  height: min(380px, 40vw);
  top: 35%;
  left: 35%;
  background: radial-gradient(circle, rgba(6, 214, 240, 0.1), transparent 70%);
  animation: orb3 26s ease-in-out infinite alternate;
  opacity: 0.3;
}
.hm-orb--4 {
  width: min(220px, 28vw);
  height: min(220px, 28vw);
  bottom: 20%;
  left: 10%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
  animation: orb4 20s ease-in-out infinite alternate;
  opacity: 0.25;
}

@keyframes orb1 {
  to {
    transform: translate(100px, 80px) scale(1.2);
  }
}
@keyframes orb2 {
  to {
    transform: translate(-80px, -100px) scale(1.15);
  }
}
@keyframes orb3 {
  to {
    transform: translate(60px, -50px) scale(1.25);
  }
}
@keyframes orb4 {
  to {
    transform: translate(-40px, 60px) scale(1.3);
  }
}

/* Grid overlay */
.hm-waves {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: clamp(44px, 5vw, 64px) clamp(44px, 5vw, 64px);
  animation: waves 28s linear infinite;
  mask-image: radial-gradient(
    ellipse 65% 55% at 50% 50%,
    #000 10%,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 65% 55% at 50% 50%,
    #000 10%,
    transparent 70%
  );
}
@keyframes waves {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: clamp(44px, 5vw, 64px) clamp(44px, 5vw, 64px);
  }
}

#hm-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/*══════════════ STAGE ══════════════*/
.hm-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: clamp(12px, 2.5vw, 32px) clamp(8px, 2vw, 20px);
}

/*══════════════ CARD — GLASS + 3D ══════════════*/
.hm-card,
.hm-logout {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(60px) saturate(160%);
  -webkit-backdrop-filter: blur(60px) saturate(160%);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: clamp(26px, 4.5vw, 40px) clamp(18px, 3vw, 28px)
    clamp(22px, 3.5vw, 30px);
  box-shadow: var(--shadow-lg), var(--shadow-glow),
    inset 0 1px 0 var(--card-highlight);
  transition: background 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  perspective: 1200px;
}

.hm-card {
  animation: cardRise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hm-logout {
  animation: cardRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.94);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* Top gradient accent line */
.hm-card::before,
.hm-logout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    var(--purple),
    var(--emerald),
    transparent
  );
  opacity: 0.7;
  border-radius: 1px;
}

/* Card inner glow */
.hm-card::after,
.hm-logout::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    transparent 40%,
    transparent 70%,
    rgba(255, 255, 255, 0.02)
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

/*══════════════ BRANDING ══════════════*/
.hm-brand {
  text-align: center;
  margin-bottom: clamp(6px, 1.2vw, 10px);
}

.hm-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.hm-type {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent2) 40%,
    var(--purple) 80%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.hm-type-ar {
  font-size: clamp(0.58rem, 1.2vw, 0.64rem);
  font-weight: 800;
  color: var(--text3);
  opacity: 0.55;
  letter-spacing: 0.06em;
}

.hm-subtitle {
  font-size: clamp(0.5rem, 0.95vw, 0.55rem);
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/*══════════════ STATUS INDICATOR ══════════════*/
.hm-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 20px;
  background: rgba(6, 214, 240, 0.06);
  border: 1px solid rgba(6, 214, 240, 0.12);
  color: var(--accent);
  font-size: clamp(0.5rem, 0.9vw, 0.54rem);
  font-weight: 700;
  margin-bottom: clamp(10px, 1.6vw, 14px);
  transition: background 0.3s, border-color 0.3s;
}

.hm-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.3);
  }
}

/*══════════════ ERROR / MESSAGE ══════════════*/
.hm-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(8px, 1.3vw, 11px) clamp(10px, 1.6vw, 14px);
  margin-bottom: clamp(8px, 1.5vw, 12px);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--r-sm);
  color: var(--rose);
  background: rgba(244, 63, 94, 0.06);
  font-size: clamp(0.58rem, 1.05vw, 0.64rem);
  font-weight: 700;
  animation: errorShake 0.55s cubic-bezier(0.36, 0, 0.66, -0.56) both;
  line-height: 1.4;
}
.hm-error i {
  font-size: clamp(0.7rem, 1.2vw, 0.78rem);
  flex-shrink: 0;
  opacity: 0.9;
}

.hm-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(8px, 1.3vw, 11px) clamp(10px, 1.6vw, 14px);
  margin-bottom: clamp(8px, 1.5vw, 12px);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--r-sm);
  color: var(--emerald2);
  background: rgba(16, 185, 129, 0.06);
  font-size: clamp(0.58rem, 1.05vw, 0.64rem);
  font-weight: 700;
  animation: msgSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  line-height: 1.4;
}
.hm-success i {
  font-size: clamp(0.7rem, 1.2vw, 0.78rem);
  flex-shrink: 0;
}

@keyframes errorShake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-6px);
  }
  30% {
    transform: translateX(6px);
  }
  45% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
  90% {
    transform: translateX(2px);
  }
}

@keyframes msgSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/*══════════════ FORM ══════════════*/
.hm-form {
  margin: 0;
}

.hm-field {
  margin-bottom: clamp(8px, 1.4vw, 12px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hm-label {
  display: block;
  font-size: clamp(0.54rem, 0.95vw, 0.6rem);
  font-weight: 800;
  color: var(--text2);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Hidden state for progressive reveal */
.hm-field.hm-hidden {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-8px);
}

.hm-field.hm-visible {
  opacity: 1;
  max-height: 200px;
  margin-bottom: clamp(8px, 1.4vw, 12px);
  transform: none;
  pointer-events: auto;
  overflow: visible;
  animation: slideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/*══════════════ INPUT WRAPPER ══════════════*/
.hm-input-wrap {
  position: relative;
  border-radius: var(--r);
  background: var(--glass);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.hm-input-wrap:focus-within {
  border-color: rgba(6, 214, 240, 0.35);
  box-shadow: 0 0 0 3px rgba(6, 214, 240, 0.06),
    0 0 24px rgba(6, 214, 240, 0.04);
  transform: translateY(-1px);
}

.hm-input-wrap.error {
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.05);
  animation: fieldErrorShake 0.4s ease;
}

@keyframes fieldErrorShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/*══════════════ INPUT ══════════════*/
.hm-input {
  width: 100%;
  height: clamp(44px, 8vw, 50px);
  padding: 0 44px 0 14px;
  border: none;
  border-radius: var(--r);
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(0.72rem, 1.3vw, 0.82rem);
  font-weight: 700;
  caret-color: var(--accent);
  direction: rtl;
  text-align: right;
  transition: color 0.3s;
  letter-spacing: 0.01em;
}

.hm-input::placeholder {
  color: var(--text3);
  opacity: 0.3;
  font-weight: 500;
}

.hm-input:-webkit-autofill,
.hm-input:-webkit-autofill:hover,
.hm-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--accent);
}

/*══════════════ FIELD ICON ══════════════*/
.hm-field-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: clamp(0.68rem, 1.1vw, 0.74rem);
  pointer-events: none;
  transition: color 0.3s;
}
.hm-input:focus ~ .hm-field-icon,
.hm-input-wrap:focus-within .hm-field-icon {
  color: var(--accent);
}

/*══════════════ PASSWORD TOGGLE ══════════════*/
.hm-eye-btn {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  font-size: clamp(0.66rem, 1.1vw, 0.72rem);
  transition: color 0.2s, background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.hm-eye-btn:hover {
  color: var(--accent);
  background: rgba(6, 214, 240, 0.06);
}
.hm-eye-btn:active {
  transform: translateY(-50%) scale(0.9);
}

/*══════════════ HINT TEXT ══════════════*/
.hm-hint {
  min-height: 22px;
  padding: 4px 2px 0;
  font-size: clamp(0.5rem, 0.85vw, 0.54rem);
  font-weight: 700;
  color: var(--text3);
  transition: color 0.3s, opacity 0.3s;
  line-height: 1.3;
}
.hm-hint.ok {
  color: var(--emerald);
}
.hm-hint.err {
  color: var(--rose);
}

/*══════════════ REMEMBER + FORGOT ROW ══════════════*/
.hm-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(10px, 1.6vw, 14px);
  flex-wrap: wrap;
}

.hm-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.hm-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--glass);
  cursor: pointer;
  position: relative;
  transition: all 0.25s;
  flex-shrink: 0;
}
.hm-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.hm-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.hm-checkbox:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hm-remember-label {
  font-size: clamp(0.54rem, 0.95vw, 0.6rem);
  font-weight: 700;
  color: var(--text2);
  transition: color 0.25s;
}

.hm-forgot {
  font-size: clamp(0.54rem, 0.95vw, 0.6rem);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s, opacity 0.25s;
}
.hm-forgot:hover {
  color: var(--accent2);
  text-decoration: underline;
}

/*══════════════ BUTTON ══════════════*/
.hm-btn {
  width: 100%;
  height: clamp(46px, 8.5vw, 52px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: clamp(0.76rem, 1.35vw, 0.84rem);
  font-weight: 900;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent2) 50%, #0891b2);
  color: #fff;
  box-shadow: 0 6px 28px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Shine effect */
.hm-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.hm-btn:hover::after {
  transform: translateX(100%);
}

.hm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(6, 214, 240, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.4);
  filter: brightness(1.08);
}

.hm-btn:active {
  transform: scale(0.96);
  transition: transform 0.1s;
  filter: brightness(0.95);
}

.hm-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  filter: none;
  pointer-events: none;
}

.hm-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Loading spinner inside button */
.hm-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
  flex-shrink: 0;
}

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

/*══════════════ FOOTER ══════════════*/
.hm-footer {
  text-align: center;
  margin-top: clamp(14px, 2.2vw, 18px);
  padding-top: clamp(10px, 1.6vw, 14px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hm-footer a {
  font-size: clamp(0.58rem, 1vw, 0.66rem);
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/*══════════════ LOGOUT PAGE ══════════════*/
.hm-logout {
  text-align: center;
}

/* Orbital animation */
.hm-orbits {
  position: relative;
  width: clamp(80px, 14vw, 100px);
  height: clamp(80px, 14vw, 100px);
  margin: 0 auto clamp(16px, 2.5vw, 22px);
}

.hm-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
}

.hm-orbit:nth-child(1) {
  inset: 0;
  border-top-color: var(--accent);
  border-right-color: rgba(6, 214, 240, 0.12);
  animation: spin 0.85s linear infinite;
}

.hm-orbit:nth-child(2) {
  inset: 10px;
  border-bottom-color: var(--emerald);
  border-left-color: rgba(16, 185, 129, 0.12);
  animation: spin 0.65s linear infinite reverse;
}

.hm-orbit:nth-child(3) {
  inset: 20px;
  border-top-color: rgba(6, 214, 240, 0.2);
  animation: spin 1.05s linear infinite;
}

.hm-orbit:nth-child(4) {
  inset: 30px;
  border-right-color: rgba(139, 92, 246, 0.12);
  animation: spin 1.25s linear infinite reverse;
}

.hm-orbit-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.hm-orbit-dot:nth-child(5) {
  top: 0;
  left: 50%;
  margin-left: -2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: orbitDot1 0.85s linear infinite;
}

.hm-orbit-dot:nth-child(6) {
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: orbitDot2 0.65s linear infinite reverse;
}

.hm-orbit-dot:nth-child(7) {
  right: 0;
  top: 50%;
  margin-top: -2px;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  animation: orbitDot3 1.05s linear infinite;
}

@keyframes orbitDot1 {
  to {
    transform: rotate(360deg);
  }
  from {
    transform: rotate(0deg) translateX(clamp(40px, 7vw, 50px));
  }
  to {
    transform: rotate(360deg) translateX(clamp(40px, 7vw, 50px));
  }
}

@keyframes orbitDot2 {
  to {
    transform: rotate(-360deg);
  }
  from {
    transform: rotate(0deg) translateX(calc(clamp(40px, 7vw, 50px) - 20px));
  }
  to {
    transform: rotate(-360deg)
      translateX(calc(clamp(40px, 7vw, 50px) - 20px));
  }
}

@keyframes orbitDot3 {
  to {
    transform: rotate(360deg);
  }
  from {
    transform: rotate(0deg) translateY(clamp(30px, 5vw, 40px));
  }
  to {
    transform: rotate(360deg) translateY(clamp(30px, 5vw, 40px));
  }
}

.hm-orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(30px, 5vw, 36px);
  height: clamp(30px, 5vw, 36px);
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(6, 214, 240, 0.08),
    rgba(139, 92, 246, 0.04)
  );
  border: 1px solid rgba(6, 214, 240, 0.1);
  display: grid;
  place-items: center;
  animation: coreBreathe 2s ease-in-out infinite;
}

.hm-orbit-core strong {
  color: var(--accent);
  font-size: clamp(0.7rem, 1.2vw, 0.82rem);
  font-weight: 900;
  font-family: var(--font-display);
}

@keyframes coreBreathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.hm-logout-title {
  font-size: clamp(0.9rem, 1.7vw, 1.05rem);
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--text);
}

.hm-logout-sub {
  color: var(--text2);
  font-size: clamp(0.56rem, 1vw, 0.62rem);
  margin-bottom: clamp(12px, 2vw, 18px);
}

/* Countdown */
.hm-cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: clamp(14px, 2.4vw, 20px);
}

.hm-cd-ring {
  position: relative;
  width: clamp(42px, 7vw, 50px);
  height: clamp(42px, 7vw, 50px);
  display: grid;
  place-items: center;
}

.hm-cd-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.hm-cd-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 3;
}

.hm-cd-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear;
  filter: drop-shadow(0 0 4px rgba(6, 214, 240, 0.3));
}

.hm-cd-num {
  position: relative;
  z-index: 1;
  font-size: clamp(0.7rem, 1.2vw, 0.82rem);
  font-weight: 900;
  color: var(--accent);
}

.hm-cd-label {
  font-size: clamp(0.44rem, 0.75vw, 0.5rem);
  color: var(--text3);
  font-weight: 700;
}

/* Logout buttons */
.hm-logout-btns {
  display: flex;
  gap: clamp(6px, 1.2vw, 10px);
  justify-content: center;
  flex-wrap: wrap;
}

.hm-logout-btns a,
.hm-logout-btns .hm-btn {
  height: clamp(38px, 6.5vw, 44px);
  padding: 0 clamp(14px, 2.5vw, 20px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-sm);
  font-size: clamp(0.6rem, 1vw, 0.66rem);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s;
}

.hm-logout-btns .hm-ghost {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text);
  width: auto;
}

.hm-logout-btns .hm-ghost:hover {
  border-color: rgba(6, 214, 240, 0.2);
  background: rgba(6, 214, 240, 0.04);
  text-decoration: none;
  color: var(--accent);
}

/*══════════════ THEME TOGGLE ══════════════*/
.hm-theme {
  position: fixed;
  top: clamp(10px, 1.6vw, 14px);
  left: clamp(10px, 1.6vw, 14px);
  z-index: 20;
  width: clamp(36px, 5vw, 42px);
  height: clamp(36px, 5vw, 42px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text2);
  cursor: pointer;
  font-size: clamp(0.68rem, 1.1vw, 0.76rem);
  transition: color 0.25s, border-color 0.25s, transform 0.25s,
    background 0.7s, box-shadow 0.25s;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}

.hm-theme:hover {
  color: var(--accent);
  border-color: rgba(6, 214, 240, 0.2);
  transform: scale(1.06);
  box-shadow: 0 2px 16px rgba(6, 214, 240, 0.1);
}

/*══════════════ FORGOT PASSWORD PAGE ══════════════*/
.hm-forgot-card {
  text-align: center;
}

.hm-forgot-icon {
  width: clamp(56px, 10vw, 68px);
  height: clamp(56px, 10vw, 68px);
  border-radius: 50%;
  margin: 0 auto clamp(14px, 2vw, 18px);
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(6, 214, 240, 0.08),
    rgba(139, 92, 246, 0.04)
  );
  border: 1.5px solid rgba(6, 214, 240, 0.12);
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  color: var(--accent);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hm-forgot-desc {
  color: var(--text2);
  font-size: clamp(0.56rem, 1vw, 0.62rem);
  margin-bottom: clamp(14px, 2vw, 18px);
  line-height: 1.6;
}

/*══════════════ RESPONSIVE ══════════════*/
@media (min-width: 1800px) {
  .hm-stage {
    max-width: 480px;
  }
  .hm-card,
  .hm-logout {
    padding: 46px 36px 34px;
    border-radius: 30px;
  }
}

@media (max-width: 480px) {
  .hm-stage {
    padding: 8px 8px 12px;
  }
  .hm-card,
  .hm-logout {
    padding: 22px 14px 16px;
    border-radius: 20px;
  }
  .hm-input {
    height: 46px;
  }
  .hm-btn {
    height: 46px;
  }
}

@media (max-width: 360px) {
  .hm-card {
    padding: 18px 10px 12px;
  }
  .hm-input {
    height: 42px;
    font-size: 0.7rem;
  }
  .hm-btn {
    height: 42px;
    font-size: 0.72rem;
  }
  .hm-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Low-end device optimizations */
body.hm-lite .hm-orb,
body.hm-lite .hm-waves,
body.hm-lite #hm-particles {
  display: none;
}
body.hm-lite .hm-card {
  animation: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/*══════════════ UTILITY ══════════════*/
.hm-text-center {
  text-align: center;
}
.hm-mt-sm {
  margin-top: 8px;
}
.hm-mb-sm {
  margin-bottom: 8px;
}
