/* ============================================================
   Certificate Portal — Global Stylesheet
   Dark glassmorphism theme with purple/violet accent palette
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-primary:      #070714;
  --bg-secondary:    #0e0e24;
  --bg-card:         rgba(255, 255, 255, 0.04);
  --bg-card-hover:   rgba(255, 255, 255, 0.07);
  --border-card:     rgba(255, 255, 255, 0.09);
  --border-glow:     rgba(139, 92, 246, 0.4);

  --accent-primary:  #8b5cf6;
  --accent-secondary:#a78bfa;
  --accent-light:    #c4b5fd;
  --accent-pink:     #ec4899;
  --accent-cyan:     #06b6d4;

  --text-primary:    #f1f5f9;
  --text-secondary:  #94a3b8;
  --text-muted:      #475569;

  --success:         #10b981;
  --warning:         #f59e0b;
  --danger:          #ef4444;
  --info:            #3b82f6;

  --gradient-hero:   linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
  --gradient-card:   linear-gradient(145deg, rgba(139,92,246,0.08) 0%, rgba(6,182,212,0.04) 100%);
  --gradient-btn:    linear-gradient(135deg, #8b5cf6, #a855f7);
  --gradient-btn-h:  linear-gradient(135deg, #7c3aed, #9333ea);

  --shadow-card:     0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:     0 0 40px rgba(139,92,246,0.15);
  --shadow-btn:      0 4px 20px rgba(139,92,246,0.4);

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --font-sans:   'Inter', system-ui, sans-serif;
  --font-display:'Space Grotesk', system-ui, sans-serif;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background Orbs ───────────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: floatOrb 20s ease-in-out infinite;
}
.bg-orb-1 { width: 600px; height: 600px; background: #8b5cf6; top: -200px; left: -100px; animation-delay: 0s; }
.bg-orb-2 { width: 400px; height: 400px; background: #ec4899; bottom: -100px; right: -50px; animation-delay: -7s; }
.bg-orb-3 { width: 300px; height: 300px; background: #06b6d4; top: 40%; left: 60%; animation-delay: -14s; }

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) scale(1); }
  33%       { transform: translateY(-30px) scale(1.05); }
  66%       { transform: translateY(20px) scale(0.95); }
}

/* ── Page Wrapper ──────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  backdrop-filter: blur(20px);
  background: rgba(7, 7, 20, 0.6);
  border-bottom: 1px solid var(--border-card);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-brand .brand-icon {
  -webkit-text-fill-color: initial;
  font-size: 1.4rem;
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ── Auth Card ─────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card-header {
  text-align: center;
  margin-bottom: 36px;
}
.auth-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-btn);
  animation: pulseIcon 3s ease-in-out infinite;
}
@keyframes pulseIcon {
  0%, 100% { box-shadow: 0 4px 20px rgba(139,92,246,0.4); }
  50%       { box-shadow: 0 4px 40px rgba(139,92,246,0.7); }
}
.auth-card-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.auth-card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Form Elements ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-primary);
  background: rgba(139,92,246,0.08);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}
.form-control::placeholder { color: var(--text-muted); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: var(--shadow-btn);
  width: 100%;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139,92,246,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent-secondary);
  border: 1px solid rgba(139,92,246,0.4);
  padding: 10px 20px;
  font-size: 0.875rem;
}
.btn-outline:hover {
  background: rgba(139,92,246,0.1);
  border-color: var(--accent-primary);
}

.btn-success-dl {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.4);
  width: 100%;
  margin-bottom: 10px;
}
.btn-success-dl:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16,185,129,0.5);
}

.btn-zip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 20px rgba(245,158,11,0.4);
  width: 100%;
  margin-top: 10px;
}
.btn-zip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,158,11,0.5);
}

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color:#fff; }

/* ── Alert Messages ────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6ee7b7;
}
.alert-info {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd;
}
.alert-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fcd34d;
}

/* ── Dashboard Layout ──────────────────────────────────────── */
.dashboard-wrapper {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

.dashboard-hero {
  text-align: center;
  margin-bottom: 48px;
}
.dashboard-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.dashboard-hero p { color: var(--text-secondary); font-size: 1rem; }

/* ── Info Cards ────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.info-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.info-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,92,246,0.12);
}
.info-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.info-card-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.info-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

/* ── Members Section ───────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-glow), transparent);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.member-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.member-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.member-card:hover::before { opacity: 1; }

.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  box-shadow: var(--shadow-btn);
}
.member-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.member-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.member-college {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Download All Section ──────────────────────────────────── */
.download-all-section {
  background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(6,182,212,0.04) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 40px;
}
.download-all-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.download-all-section p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

/* ── OTP Input ─────────────────────────────────────────────── */
.otp-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}
.otp-digit {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  caret-color: var(--accent-primary);
}
.otp-digit:focus {
  border-color: var(--accent-primary);
  background: rgba(139,92,246,0.1);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
  transform: scale(1.05);
}
.otp-digit.filled {
  border-color: var(--accent-secondary);
  color: var(--accent-light);
}

.otp-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* ── Countdown ─────────────────────────────────────────────── */
.countdown {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.countdown-time {
  font-weight: 700;
  color: var(--accent-secondary);
  font-family: var(--font-display);
}
.countdown-time.expired { color: var(--danger); }

/* ── Verify Page ───────────────────────────────────────────── */
.verify-wrapper {
  max-width: 580px;
  margin: 0 auto;
  padding: 60px 20px;
}
.verify-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: slideUp 0.5s ease-out;
}
.verify-header {
  background: linear-gradient(135deg, #10b981, #059669);
  padding: 40px 40px 32px;
  text-align: center;
}
.verify-header.invalid { background: linear-gradient(135deg, #ef4444, #dc2626); }
.verify-check { font-size: 3.5rem; margin-bottom: 12px; animation: popIn 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }
@keyframes popIn {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.verify-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 6px;
}
.verify-header p { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

.verify-body { padding: 36px 40px; }
.verify-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-card);
}
.verify-row:last-child { border-bottom: none; }
.verify-row-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  margin-right: 16px;
}
.verify-row-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}
.verify-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
}
.badge-valid {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.3);
}

/* ── Not Eligible Page ─────────────────────────────────────── */
.not-eligible-card {
  max-width: 480px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-xl);
  padding: 56px 44px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card), 0 0 40px rgba(239,68,68,0.08);
  animation: slideUp 0.5s ease-out;
}
.not-eligible-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}
.not-eligible-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 12px;
}
.not-eligible-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ── Admin ─────────────────────────────────────────────────── */
.admin-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  animation: slideUp 0.5s ease-out;
}
.upload-zone {
  border: 2px dashed rgba(139,92,246,0.4);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(139,92,246,0.04);
}
.upload-zone:hover {
  border-color: var(--accent-primary);
  background: rgba(139,92,246,0.08);
}
.upload-zone p { color: var(--text-secondary); margin-top: 10px; font-size: 0.88rem; }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-card);
}
.divider span { color: var(--text-muted); font-size: 0.8rem; }

/* ── Utility ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); font-size: 0.85rem; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.w-100 { width: 100%; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.loading .spinner { display: block; }
.btn.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 3px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 16px 20px; }
  .auth-card { padding: 36px 28px; }
  .dashboard-hero h1 { font-size: 1.8rem; }
  .otp-digit { width: 44px; height: 52px; font-size: 1.3rem; }
  .verify-body { padding: 28px 24px; }
  .dashboard-wrapper { padding: 24px 16px; }
}
