/* ─────────────────────────────────────────
   my.NextPeriod — Shared Styles (DARK ONLY)
   my.nextperiod.yousal.dev  (private repo)
   Brand: #5E17EB | Dark: #0A0612
───────────────────────────────────────── */
:root {
  --brand:        #5E17EB;
  --brand-light:  #7B3FF2;
  --brand-dark:   #3D0DB3;
  --brand-glow:   rgba(94, 23, 235, 0.5);
  --accent:       #C084FC;
  --accent2:      #E879F9;
  --bg:           #0A0612;
  --bg2:          #0F0A1E;
  --surface:      rgba(94, 23, 235, 0.08);
  --surface2:     rgba(94, 23, 235, 0.18);
  --border:       rgba(94, 23, 235, 0.3);
  --border-hover: rgba(94, 23, 235, 0.7);
  --text:         #F3EEFF;
  --text-muted:   rgba(243, 238, 255, 0.65);
  --text-dim:     rgba(243, 238, 255, 0.3);
  --green:        #34D399;
  --blue:         #60A5FA;
  --yellow:       #FBBF24;
  --red:          #F87171;
  --radius:       18px;
  --radius-sm:    10px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%,  rgba(94,23,235,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 42% 35% at 88% 84%,  rgba(192,132,252,0.06) 0%, transparent 55%);
  color: var(--text);
  min-height: 100vh;
  font-family: 'Syne', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.024;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── Layout ── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 72px;
}

.container { width: 100%; max-width: 860px; }
.narrow    { max-width: 430px; }

/* ── Card ── */
.card {
  background: rgba(10, 6, 18, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 48px rgba(94,23,235,0.1), inset 0 1px 0 rgba(255,255,255,0.03);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 100px;
  border: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
  white-space: nowrap;
}

/* الزر الأساسي - بنفسجي مع توهج */
.btn-primary { 
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; 
  box-shadow: 0 0 20px var(--brand-glow);
  border: 1px solid rgba(94, 23, 235, 0.4);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  box-shadow: 0 0 32px rgba(94,23,235,0.6); 
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* الزر الثانوي - شفاف بحدود وتوهج عند المرور - بدون أبيض */
.btn-ghost { 
  background: rgba(0, 0, 0, 0.4);
  color: var(--text); 
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { 
  background: rgba(94, 23, 235, 0.2); 
  color: #fff; 
  border-color: var(--brand-light);
  box-shadow: 0 0 16px rgba(94,23,235,0.3);
  transform: translateY(-1px);
}

/* الزر الخطير - أحمر شفاف */
.btn-danger { 
  background: rgba(248, 113, 113, 0.1);
  color: var(--red); 
  border: 1px solid rgba(248, 113, 113, 0.3); 
}
.btn-danger:hover { 
  background: rgba(248, 113, 113, 0.2); 
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
  transform: translateY(-1px);
}

.btn-sm   { padding: 8px 18px; font-size: 0.82rem; }
.btn-full { width: 100%; }

/* ── Form ── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: 'Space Mono', monospace;
}

.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
  pointer-events: none;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px 12px 40px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.88rem;
  transition: all 0.2s;
  outline: none;
}
input:focus { 
  border-color: var(--brand-light); 
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(94,23,235,0.2); 
}
input::placeholder { color: var(--text-dim); }

.input-hint { margin-top: 6px; font-size: 0.73rem; color: var(--text-muted); font-family: 'Space Mono', monospace; }

/* Suffix wrap */
.suffix-wrap { display: flex; }
.suffix-wrap input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; flex: 1; padding-left: 14px; }
.suffix-label {
  display: flex; align-items: center;
  padding: 0 14px;
  background: rgba(94, 23, 235, 0.15);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
  user-select: none;
}

/* ── Tab toggle ── */
.tab-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 26px;
}
.tab-toggle button {
  flex: 1; padding: 9px 16px; border-radius: 100px;
  border: none; background: transparent;
  color: var(--text-muted);
  font-family: 'Syne', sans-serif; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.tab-toggle button.active { 
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; 
  box-shadow: 0 0 16px var(--brand-glow);
}

/* ── Alerts ── */
.alert {
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-family: 'Space Mono', monospace;
  margin-bottom: 16px; line-height: 1.5; display: none;
}
.alert.show { display: block; }
.alert-error   { background: rgba(248,113,113,0.12);  border: 1px solid rgba(248,113,113,0.3); color: var(--red); }
.alert-success { background: rgba(52,211,153,0.1);  border: 1px solid rgba(52,211,153,0.3);  color: var(--green); }
.alert-info    { background: rgba(94,23,235,0.1);    border: 1px solid var(--border);           color: var(--accent); }

/* ── Topnav ── */
.topnav {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 30px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 8px var(--brand-glow)); }
.nav-brand span {
  font-weight: 800; font-size: 1.05rem;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-right { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.88rem; color: #fff;
  box-shadow: 0 0 14px var(--brand-glow);
  cursor: pointer; user-select: none; transition: all 0.2s;
}
.avatar:hover { 
  box-shadow: 0 0 24px rgba(94,23,235,0.7);
  transform: scale(1.02);
}

/* ── Spinner ── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
}
.spinner.show { display: inline-block; }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--text-dim);
  font-size: 0.75rem; font-family: 'Space Mono', monospace;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Animations ── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 28px rgba(94,23,235,0.1), inset 0 1px 0 rgba(255,255,255,0.03); }
  50%       { box-shadow: 0 0 52px rgba(94,23,235,0.2), inset 0 1px 0 rgba(255,255,255,0.03); }
}

.anim-1 { animation: fadeUp 0.5s 0.05s ease both; }
.anim-2 { animation: fadeUp 0.5s 0.12s ease both; }
.anim-3 { animation: fadeUp 0.5s 0.20s ease both; }
.anim-4 { animation: fadeUp 0.5s 0.28s ease both; }
.anim-5 { animation: fadeUp 0.5s 0.36s ease both; }

@media (max-width: 600px) {
  .card { padding: 20px 16px; }
  .page { padding: 22px 14px 60px; }
}
