/* ================================================================
   components.css — Buttons, Cards, Forms, Toast, Auth, Loader
   PakAnonymous.org
   ================================================================ */

/* ── TEXT LOGO ─────────────────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.logo-brand {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.logo-tld {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--gold);
  transition: color 0.2s;
}

.logo:hover .logo-brand { color: var(--text); }
.logo:hover .logo-tld   { color: var(--gold-light); }

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  padding: 14px 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* Primary — gold fill */
.btn-primary {
  background: var(--gold);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #080808; }
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  transform: translateX(-110%);
  transition: transform 0.38s ease;
}
.btn-primary:hover::after { transform: translateX(0); }
.btn-primary:hover        { transform: translateY(-2px); box-shadow: 0 8px 28px var(--gold-glow); }
.btn-primary:active       { transform: translateY(0); }

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.btn-outline:active { transform: translateY(0); }

/* Google sign-in styled button */
.btn-google {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  padding: 10px 22px;
}
.btn-google:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
@media (prefers-color-scheme: dark) {
  .btn-google:hover { color: #080808; }
}
.btn-google:disabled { opacity: 0.5; cursor: wait; transform: none; box-shadow: none; }

/* Spinner inside button */
.btn-spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(128,128,128,0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Button group */
.btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

/* ── CARDS ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.25rem 1.875rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.42s ease;
}
.card:hover::after  { width: 100%; }
.card:hover         { border-color: var(--gold-border); transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.card-number {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold-alpha);
  line-height: 1;
  display: block;
}
/* Make number visible enough but subtle */
@media (prefers-color-scheme: light) {
  .card-number { color: rgba(154, 114, 0, 0.15); }
}
@media (prefers-color-scheme: dark) {
  .card-number { color: rgba(201, 162, 39, 0.12); }
}

.card-tag {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-alpha);
  border: 1px solid var(--gold-border);
  padding: 3px 10px;
  display: inline-block;
  flex-shrink: 0;
}

.card-icon {
  width: 48px; height: 48px;
  background: var(--gold-alpha);
  border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}
.card-icon svg { width: 20px; height: 20px; stroke: var(--gold); fill: none; stroke-width: 1.5; }

.card-title { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.65rem; color: var(--text); }
.card-desc  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.85; font-weight: 300; }

/* ── NOOR FEATURED CARD ────────────────────────────────────────── */
.noor-feature {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  padding: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition);
}
.noor-feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 40%, var(--gold-light) 60%, transparent 100%);
}
.noor-feature:hover { box-shadow: var(--shadow-glow); transform: translateY(-3px); }

.noor-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.noor-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 11px;
  margin-bottom: 1.5rem;
}
@media (prefers-color-scheme: dark) { .noor-live-badge { color: #080808; } }

.noor-live-dot {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.noor-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 0.95;
  margin-bottom: 0.75rem;
}
.noor-title .noor-dot { color: var(--gold); font-style: italic; }

.noor-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
  font-weight: 300;
  margin-bottom: 2rem;
  max-width: 480px;
}

.noor-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px; height: 180px;
  position: relative;
  flex-shrink: 0;
}

.noor-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
}
.noor-ring-1 { width: 180px; height: 180px; animation: slowSpin 28s linear infinite; }
.noor-ring-2 { width: 130px; height: 130px; animation: slowSpin 18s linear infinite reverse; border-style: dashed; }

.noor-glow {
  position: absolute;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  filter: blur(18px);
  animation: glowPulse 4s ease-in-out infinite;
}

.noor-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--gold-alpha);
  border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.noor-icon svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.2; }

@keyframes slowSpin  { to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }

@media (max-width: 680px) {
  .noor-inner    { grid-template-columns: 1fr; gap: 2rem; }
  .noor-visual   { width: 130px; height: 130px; }
  .noor-ring-1   { width: 130px; height: 130px; }
  .noor-ring-2   { width: 90px; height: 90px; }
  .noor-icon     { width: 56px; height: 56px; }
  .noor-icon svg { width: 22px; height: 22px; }
}

/* ── STAT CARD ─────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.25rem 1.5rem;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover   { border-color: var(--gold-border); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.stat-value        { font-family: var(--serif); font-size: 2.75rem; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 0.5rem; display: block; }
.stat-label        { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; display: block; }
.stat-sub          { font-size: 0.73rem; color: var(--text-muted); font-weight: 300; }

/* ── FORMS ─────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 12px 15px;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}
.form-input:hover,
.form-textarea:hover { border-color: var(--border-light); }
.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-alpha);
  background: var(--bg-card);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }
.form-textarea { resize: vertical; min-height: 128px; line-height: 1.7; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── CTA BANNER ────────────────────────────────────────────────── */
.cta-banner {
  background: var(--gold-alpha);
  border: 1px solid var(--gold-border);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.cta-banner h3 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 0.875rem; }
.cta-banner p  { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 2.25rem; font-weight: 300; }

/* ── TOAST ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  color: var(--text);
  padding: 0.9rem 1.4rem;
  font-size: 0.86rem;
  font-weight: 400;
  z-index: 9500;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  animation: toastIn 0.38s cubic-bezier(0.4,0,0.2,1);
  line-height: 1.5;
}
.toast.hiding { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn  { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to   { transform: translateY(60px); opacity: 0; } }
@media (max-width: 480px) { .toast { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; } }

/* ── LOADING DOTS ──────────────────────────────────────────────── */
.loading-dots { display: inline-flex; align-items: center; gap: 5px; }
.loading-dots span {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: dotBounce 1.3s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.loading-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes dotBounce {
  0%,80%,100% { transform: scale(0.6); opacity: 0.35; }
  40%          { transform: scale(1);   opacity: 1; }
}

/* ── TYPING CURSOR ─────────────────────────────────────────────── */
.cursor {
  display: inline-block;
  width: 2px; height: 0.9em;
  background: var(--gold);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── APP LOADER ────────────────────────────────────────────────── */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--loader-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.45s ease;
}

.app-loader-logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}
.app-loader-logo .logo-brand { font-size: 1.6rem; }
.app-loader-logo .logo-tld   { font-size: 1.6rem; }

.app-loader-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  filter: blur(24px);
  animation: loaderGlow 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes loaderGlow {
  0%,100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.1); }
}

/* ── USER CHIP ─────────────────────────────────────────────────── */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-alpha);
  border: 1px solid var(--gold-border);
  padding: 4px 11px 4px 4px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.user-chip:hover { background: rgba(154,114,0,0.14); }
@media (prefers-color-scheme: dark) {
  .user-chip:hover { background: rgba(201,162,39,0.14); }
}

.user-chip img {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  object-fit: cover;
  flex-shrink: 0;
}
.user-chip-name { font-size: 0.78rem; font-weight: 500; color: var(--text); }

/* Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  min-width: 200px;
  display: none;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  animation: dropIn 0.2s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.user-chip.open .user-dropdown { display: block; }

.dropdown-header {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}
.dropdown-name  { font-size: 0.87rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown-email { font-size: 0.73rem; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.18s;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--gold); }
.dropdown-item svg   { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; }
