/* AttendKaro.in - World-Class Student Productivity & Academic Design System */

:root {
  /* Color Palette - Light Mode Default */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-input: #f1f5f9;

  --border-color: #e2e8f0;
  --border-highlight: rgba(79, 70, 229, 0.35);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.08);
  --primary-glow: rgba(79, 70, 229, 0.2);

  --accent-purple: #9333ea;
  --accent-purple-light: rgba(147, 51, 234, 0.08);

  --success: #059669;
  --success-light: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.3);

  --warning: #d97706;
  --warning-light: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.3);

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

  --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-glow: 0 10px 30px -5px rgba(79, 70, 229, 0.15);

  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #111726;
  --bg-card: rgba(21, 29, 46, 0.75);
  --bg-card-hover: rgba(30, 41, 64, 0.85);
  --bg-input: #172033;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.4);

  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);

  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.3);

  --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px -5px rgba(99, 102, 241, 0.25);
}

/* Reset & Base */
*, *::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-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glow Background */
.bg-glow-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 600px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  position: absolute;
  top: -150px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0) 70%);
  filter: blur(60px);
}

.bg-glow-2 {
  position: absolute;
  top: -100px;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, rgba(147, 51, 234, 0) 70%);
  filter: blur(60px);
}

/* Typography */
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .navbar {
  background-color: rgba(9, 13, 22, 0.9);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.brand-suffix {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 0.75rem;
  }
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  z-index: 10;
}

.theme-btn:hover {
  border-color: var(--border-highlight);
  background: var(--bg-input);
}

/* App Wrapper */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem 1.5rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 2.5rem auto;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: var(--primary-light);
  border: 1px solid var(--border-highlight);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Live Search Filter Input */
.search-filter-wrapper {
  max-width: 550px;
  margin: 1.5rem auto 0 auto;
  position: relative;
}

.search-filter-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 100px;
  padding: 0.95rem 1.5rem 0.95rem 3rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: all 0.25s ease;
}

.search-filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-filter-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

/* Category Tools Grid */
.category-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.15rem;
  position: relative;
  z-index: 5;
}

.tool-launch-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.tool-launch-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.12);
}

.tool-launch-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.tool-launch-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.tool-launch-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Glass Card Container */
.glass-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 2;
}

/* Forms & Inputs */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}
.label-hint { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

.form-input {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-light);
}

.stepper-btn-group { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.step-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.step-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--border-highlight); }

.preset-group { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.preset-btn {
  flex: 1;
  padding: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.preset-btn:hover, .preset-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Results Display */
.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.gauge-ring-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem auto;
}
.gauge-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-ring-bg { fill: none; stroke: var(--bg-input); stroke-width: 14; }
.gauge-ring-fill {
  fill: none; stroke: var(--primary); stroke-width: 14; stroke-linecap: round;
  stroke-dasharray: 502; stroke-dashoffset: 502;
  transition: stroke-dashoffset 0.8s ease-in-out, stroke 0.4s ease;
}
.gauge-center-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
}
.gauge-percent-num { font-family: var(--font-heading); font-size: 2.75rem; font-weight: 800; line-height: 1; }
.gauge-percent-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; margin-top: 0.2rem; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.25rem;
  border-radius: 100px; font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; margin-bottom: 1.5rem;
}
.status-safe { background-color: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.status-warning { background-color: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.status-danger { background-color: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }

.metrics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; margin-bottom: 1.5rem; }
.metric-box { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.2rem; text-align: center; }
.metric-val { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.metric-title { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; font-weight: 600; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: white; border: none; padding: 0.85rem 1.75rem; border-radius: var(--radius-md);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem; box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
  text-decoration: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35); }

.btn-secondary {
  background: var(--bg-surface); color: var(--text-main); border: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem; border-radius: var(--radius-md); font-family: var(--font-heading);
  font-weight: 600; font-size: 0.92rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--primary); background: var(--primary-light); }

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 3.5rem 0;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ */
.faq-section { margin-top: 5rem; }
.faq-title { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 2rem; }
.faq-accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }
.faq-question { width: 100%; padding: 1.25rem 1.5rem; background: transparent; border: none; color: var(--text-main); font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-icon { transition: transform 0.3s ease; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0, 1, 0, 1); padding: 0 1.5rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 500px; padding: 0 1.5rem 1.25rem 1.5rem; }

/* 4-Column Footer */
.footer {
  border-top: 1px solid var(--border-color);
  margin-top: 6rem;
  padding: 4rem 1.5rem 2rem 1.5rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 850px) {
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 550px) {
  .footer-container { grid-template-columns: 1fr; }
}

.footer-col-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Kaamora Tech Copyright Attribution Styling */
.copyright-bar {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.copyright-bar a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.copyright-bar a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.toast {
  position: fixed; bottom: 2rem; right: 2rem; background: var(--bg-surface); border: 1px solid var(--border-highlight);
  color: var(--text-main); padding: 0.85rem 1.5rem; border-radius: var(--radius-md); box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  font-weight: 600; font-size: 0.9rem; z-index: 1000; display: flex; align-items: center; gap: 0.5rem;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
