:root {
  --primary-color: #065f46;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --secondary-color: #34d399;
  --dark-bg: #0f172a;
  --light-bg: #f0fdf4;
  --text-dark: #1e293b;
  --text-light: #f1f5f9;
  --white: #ffffff;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-bg);
  overflow-x: hidden;
}

/* Theme Variables */
/* Fix white text visibility in light mode */
body.light-theme {
  --bg-color: var(--light-bg);
  --text-color: var(--text-dark);
  --header-bg: rgba(255, 255, 255, 0.95);
  --card-bg: var(--white);
  --text-light: #64748b;
}

body.dark-theme {
  --bg-color: var(--dark-bg);
  --text-color: var(--text-light);
  --header-bg: rgba(15, 23, 42, 0.95);
  --card-bg: #1e293b;
  --text-light: #94a3b8;
}

body.dark-theme {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

#main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 10px;
}

.logo {
  height: 40px;
  width: auto;
}

.logo2 {
  height: 300px;
  width: auto;
}

/* Logo Switching */
body.light-theme .logo-light {
  display: none;
}
body.light-theme .logo-dark {
  display: block;
}
body.dark-theme .logo-light {
  display: block;
}
body.dark-theme .logo-dark {
  display: none;
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white !important;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--primary-color);
  color: var(--primary-color) !important;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white !important;
}

.btn-whatsapp {
  background-color: #25d366;
  color: white !important;
}

/* Hero Section */
.hero {
  padding: 150px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.highlight {
  color: var(--primary-color);
}

.hero-illustration {
  font-size: 10rem;
  color: var(--primary-color);
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Sections */
.section-padding {
  padding: 80px 0;
}

.bg-light {
  background-color: rgba(0, 0, 0, 0.02);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-10px);
}

.icon-box {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.pricing-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.pricing-card.popular {
  border: 2px solid var(--primary-color);
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.plan-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price span {
  font-size: 1rem;
  color: inherit;
  opacity: 0.7;
}

.plan-features {
  list-style: none;
  margin-bottom: 30px;
  flex-grow: 1;
}

.plan-features li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features i {
  color: var(--primary-color);
}

/* Video */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Community */
.community-box {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 50px;
  border-radius: 20px;
  text-align: center;
}

.community-content h2 {
  margin-bottom: 15px;
}

.community-content p {
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.main-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 60px 0 20px;
}

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

.footer-col h3 {
  color: white;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.footer-col a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  font-size: 1.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.developer-credit a {
  color: var(--secondary-color);
  text-decoration: none;
}

/* Scroll Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 {
  transition-delay: 0.1s;
}
.delay-200 {
  transition-delay: 0.2s;
}
.delay-300 {
  transition-delay: 0.3s;
}

/* Chatbot */
#chatbot-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#chatbot-launcher:hover {
  transform: scale(1.1);
}

#chatbot-launcher img {
  width: 30px;
  height: 30px;
}

#chatbot-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  transform-origin: bottom right;
}

#chatbot-widget.chatbot-closed {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.chatbot-header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-avatar {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 5px;
}

#chatbot-toggle-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.chatbot-body {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: var(--bg-color);
}

.message {
  margin-bottom: 10px;
  padding: 10px 15px;
  border-radius: 10px;
  max-width: 80%;
  font-size: 0.9rem;
}

.bot-message {
  background-color: #e2e8f0;
  color: #1e293b;
  border-bottom-left-radius: 0;
}

.user-message {
  background-color: var(--primary-color);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 0;
}

.chatbot-input {
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 10px;
  background-color: var(--card-bg);
}

.chatbot-input input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  outline: none;
}

#chat-send {
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
}

/* Mobile Responsive */
/* Hide hamburger menu on desktop */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  /* Mobile Quiz Optimization */
  .quiz-header {
    margin-top: 100px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }

  .quiz-header h2 {
    font-size: 1.2rem !important;
  }

  .quiz-header p {
    font-size: 0.8rem !important;
  }

  .question-card {
    padding: 0.75rem !important;
    margin-bottom: 1rem !important;
  }

  .question-text {
    font-size: 0.9rem !important;
    padding: 0.7rem !important;
    min-height: 50px !important;
  }

  .option-item {
    gap: 0.5rem !important;
    padding: 0.6rem !important;
    font-size: 0.85rem !important;
  }

  .question-overview {
    gap: 0.5rem !important;
  }

  .question-box {
    width: 35px !important;
    height: 35px !important;
    font-size: 0.75rem !important;
  }

  /* Mobile Dashboard Optimization */
  .dashboard-header h1 {
    font-size: 1.4rem !important;
  }

  .dashboard-header p {
    font-size: 0.85rem !important;
  }

  .stat-card {
    padding: 1rem !important;
  }

  .stat-card h3 {
    font-size: 1.2rem !important;
  }

  .stat-card p {
    font-size: 0.8rem !important;
  }

  /* Mobile Quiz Results */
  .result-header h1 {
    font-size: 1.3rem !important;
  }

  .result-score {
    font-size: 1.5rem !important;
  }

  /* Mobile Leaderboard */
  .leaderboard-table {
    font-size: 0.8rem !important;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.5rem !important;
  }

  /* Mobile My Quizzes */
  .quizzes-table {
    font-size: 0.8rem !important;
  }

  .quizzes-table th,
  .quizzes-table td {
    padding: 0.5rem !important;
  }

  /* Fixed mobile menu to display when active */
  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--header-bg);
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav a,
  .main-nav button {
    display: block;
    width: 100%;
    text-align: left;
  }

  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
  }

  #chatbot-widget {
    width: 90%;
    right: 5%;
  }
}

/* Ensure hamburger is hidden on larger screens */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }

  .main-nav {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: all !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .main-nav ul {
    flex-direction: row !important;
    gap: 20px !important;
  }
}

/* Added Auth and Dashboard Styles */

/* Shared Utilities */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.border-color {
  --border-color: rgba(0, 0, 0, 0.1);
}

body.dark-theme {
  --border-color: rgba(255, 255, 255, 0.1);
}

body.light-theme {
  --border-color: rgba(0, 0, 0, 0.1);
}

/* Auth Section */
.auth-section {
  padding: 100px 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--border-color);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.auth-card p {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: border-color 0.3s;
  font-size: 1rem;
}

.form-group input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

/* Theme Toggle */
#theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: inherit;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

#theme-toggle:hover {
  background: rgba(79, 70, 229, 0.1);
}

/* Dashboard Styles */
.dashboard-section {
  padding: 120px 0 60px;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.stat-info {
  flex-grow: 1;
}

.stat-info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
  color: var(--text-color);
}

.stat-info p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.dashboard-actions h2 {
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s;
}

.action-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.action-btn i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid #dc2626;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid #16a34a;
}

/* Notification Bell */
.notification-bell {
  position: relative;
  padding: 8px;
}

.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  display: none;
}

.notification-dot.active {
  display: block;
}

/* Quiz Creation Styles */
.create-quiz-section {
  padding: 120px 0 60px;
  min-height: 100vh;
}

.wizard-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.wizard-header h1 {
  margin-bottom: 2rem;
  text-align: center;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.wizard-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: var(--transition);
}

.step.active .step-num {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.step-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.wizard-step {
  animation: fadeIn 0.5s;
}

.wizard-step.hidden {
  display: none;
}

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

.form-row {
  margin-bottom: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  font-family: inherit;
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.token-estimate {
  background: rgba(79, 70, 229, 0.1);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.token-estimate i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.separator {
  color: var(--border-color);
}

/* Generate Status */
.generate-status {
  text-align: center;
  padding: 3rem 0;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 2rem;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 2rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  width: 0%;
  animation: progress 3s ease-in-out;
}

@keyframes progress {
  to {
    width: 100%;
  }
}

/* Questions Editor */
.edit-header {
  margin-bottom: 2rem;
}

.question-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.question-num {
  font-weight: 600;
  color: var(--primary-color);
}

.btn-icon {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(239, 68, 68, 0.1);
}

.question-text {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  resize: vertical;
  min-height: 60px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-input {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border-color);
}
