/* ==========================================================================
   styles.css - Kabir Technical Writing Project Survey Portal
   Theme: Sleek Dark Glassmorphism, Deep Obsidian, Indigo & Violet Accents
   ========================================================================== */

:root {
  --bg-dark: #070b14;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --bg-surface: #0f172a;
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.3);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 36px -4px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Background Ambient Glows */
.blob-bg {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}
.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #4f46e5, #06b6d4);
  top: -100px;
  right: -100px;
}
.blob-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #7c3aed, #0284c7);
  bottom: -150px;
  left: -150px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: #fff; }

.gradient-text {
  background: linear-gradient(135deg, #c7d2fe 0%, #818cf8 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.justify-center { justify-content: center; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-accent { color: var(--accent) !important; }

/* Reusable Glass Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #fff;
}
.btn-accent:hover {
  background: linear-gradient(135deg, #0891b2, #0369a1);
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}
.btn-glass:hover {
  background: rgba(99, 102, 241, 0.22);
  color: #fff;
}

.btn-sm { font-size: 0.85rem; padding: 0.5rem 1rem; }
.btn-lg { font-size: 1rem; padding: 0.85rem 1.75rem; border-radius: var(--radius-md); }
.btn-xl { font-size: 1.05rem; padding: 1rem 2.2rem; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 0;
}
.nav-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
}
.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}
.brand-title .highlight { color: var(--accent); }
.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a:hover { color: #fff; }

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem 0;
}
.hero-container {
  max-width: 820px;
  margin: 0 auto;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: #c7d2fe;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1.25rem;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-subtitle strong { color: #fff; }

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.quick-stats-strip {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.5rem;
  gap: 1.25rem;
}
.quick-stat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
}
.quick-stat i {
  color: var(--primary);
  font-size: 1.1rem;
}
.quick-stat .num {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.1;
}
.quick-stat .lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.quick-stat-sep {
  width: 1px;
  height: 24px;
  background: var(--border-glass);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}
.section-header {
  max-width: 680px;
  margin: 0 auto 3rem auto;
}
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-tag-primary { color: #a5b4fc; }

.section-title {
  font-size: 2.15rem;
  margin-bottom: 0.75rem;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Feature Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.feature-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}
.gradient-icon-1 { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.gradient-icon-2 { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.gradient-icon-3 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.65rem; }
.feature-card p { font-size: 0.88rem; line-height: 1.6; color: #94a3b8; }

/* Consent Card */
.consent-card {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  border-color: rgba(99, 102, 241, 0.25);
}
.consent-icon { font-size: 2rem; color: #818cf8; }
.consent-content h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.consent-content p { font-size: 0.84rem; margin-bottom: 0.5rem; }

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.84rem;
  color: #e2e8f0;
}
.custom-checkbox input { accent-color: var(--primary); width: 16px; height: 16px; }

/* Discipline Adaptive Badge */
.discipline-badge-wrap {
  margin: 1.25rem 0 1.75rem 0;
  display: flex;
  justify-content: center;
}
.discipline-adaptive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.28);
  animation: badgePop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.discipline-adaptive-badge i {
  color: var(--accent);
  font-size: 1.05rem;
}
.discipline-adaptive-badge .disc-name {
  color: #38bdf8;
  font-weight: 700;
}

@keyframes badgePop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Question Dynamic Update Animation */
.question-text-fade {
  animation: qFade 0.35s ease;
}
@keyframes qFade {
  0% { opacity: 0.3; transform: translateY(-3px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Survey Form */
.survey-form-wrapper {
  padding: 2.5rem;
}
.form-block { margin-bottom: 2rem; }
.block-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.block-num {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.block-header h3 { font-size: 1.2rem; margin-bottom: 0.15rem; }
.block-desc { font-size: 0.82rem; color: var(--text-muted); }

.form-divider {
  border: none;
  height: 1px;
  background: var(--border-glass);
  margin: 2rem 0;
}

.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.4rem;
}
.required { color: var(--danger); }

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon i {
  position: absolute;
  left: 1rem;
  color: var(--text-subtle);
  font-size: 0.9rem;
  pointer-events: none;
}
.input-with-icon .form-control { padding-left: 2.75rem; }

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: rgba(0, 0, 0, 0.6);
}
.form-control option { background-color: var(--bg-surface); color: #fff; padding: 6px 8px; }
.form-control optgroup {
  background-color: #0b1120;
  color: #a5b4fc;
  font-weight: 700;
  padding: 6px 0;
}
.text-area { resize: vertical; min-height: 80px; }

.field-error {
  display: block;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.35rem;
}

/* Question Rows */
.question-row { margin-bottom: 1.75rem; }
.q-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.85rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}

/* Radio Pills */
.radio-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: #cbd5e1;
  font-weight: 500;
  transition: var(--transition);
  user-select: none;
}
.radio-pill:hover span {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.radio-pill input[type="radio"]:checked + span {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Likert Scales */
.likert-scale-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.scale-pills {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.scale-pill {
  flex: 1;
  position: relative;
  cursor: pointer;
  text-align: center;
}
.scale-pill input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.scale-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
  transition: var(--transition);
}
.scale-pill:hover span { background: rgba(255, 255, 255, 0.08); color: #fff; }
.scale-pill input[type="radio"]:checked + span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.form-submit-row {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.submit-disclaimer { font-size: 0.8rem; color: var(--text-subtle); }

.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-bottom: 1rem;
}
.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Minimal Footer */
.footer {
  background: #040711;
  border-top: 1px solid var(--border-glass);
  padding: 3rem 0 2rem 0;
  position: relative;
  z-index: 10;
}
.footer-simple-desc {
  font-size: 0.88rem;
  margin: 0.85rem 0 1.25rem 0;
  color: var(--text-muted);
}
.footer-admin-wrap {
  margin-bottom: 1.25rem;
}
.admin-discreet-link {
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.6;
  transition: var(--transition);
}
.admin-discreet-link:hover {
  opacity: 1;
  color: var(--accent);
}
.copyright-txt {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(4, 7, 17, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-dialog {
  width: 100%;
  max-width: 1040px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.modal-sm { max-width: 440px; padding: 2.25rem; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-glass);
}
.modal-title-group { display: flex; align-items: center; gap: 0.85rem; }
.modal-subtitle { font-size: 0.78rem; color: var(--text-muted); }

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}
.btn-close-modal:hover { color: #fff; }

.modal-body { padding: 1.75rem; overflow-y: auto; }

.admin-login-box { max-width: 380px; margin: 1.5rem auto; text-align: center; }
.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.admin-login-box h4 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.admin-login-box p { font-size: 0.85rem; margin-bottom: 1.5rem; }

/* Admin Dashboard Table */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.admin-stat-card .stat-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}
.admin-stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.search-box { position: relative; flex-grow: 1; max-width: 380px; }
.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 0.88rem;
}
.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.88rem;
}
.toolbar-actions { display: flex; gap: 0.65rem; }

.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  max-height: 480px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th {
  background: rgba(15, 23, 42, 0.95);
  padding: 0.85rem 1rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-glass);
  text-align: left;
}
.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.025); }

.badge-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.badge-daily { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.badge-weekly { background: rgba(99, 102, 241, 0.15); color: #c7d2fe; }
.badge-rarely { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

/* Success Modal */
.success-icon-anim {
  font-size: 3.2rem;
  color: var(--success);
  margin-bottom: 0.85rem;
}
.success-actions { display: flex; justify-content: center; margin-top: 1.25rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 2.1rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-stats-strip { flex-direction: column; align-items: flex-start; gap: 0.65rem; }
  .quick-stat-sep { display: none; }
}
