:root {
  /* Deep Blue to Blue Theme */
  --primary: #1e3a8a;       /* Deep Blue */
  --primary-light: #3b82f6; /* Vibrant Blue */
  --success: #22c55e;      /* Green 500 */
  --success-dark: #15803d; /* Green 700 */
  --error: #ef4444;        /* Red 500 */
  --error-dark: #b91c1c;   /* Red 700 */
  --bg-grad: linear-gradient(135deg, #f0f4f8 0%, #dbeafe 100%); /* Light blueish bg */
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--bg-grad);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: var(--text-main);
  padding: 20px;
}

/* Main Card */
.app-container {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 
    0 20px 40px -5px rgba(30, 58, 138, 0.15), /* Blue tinted shadow */
    0 0 0 1px rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
  transition: height 0.3s ease;
}

/* --- LOGO STYLES --- */
.brand-logo {
  text-align: center;
  margin-bottom: 25px;
  margin-top: 5px;
}

.brand-logo img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.progress-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.score-board {
  background: #eff6ff; /* Very light blue */
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 800;
  border: 1px solid #bfdbfe;
  font-size: 14px;
}

/* Question Area */
.question-box {
  text-align: center;
  margin-bottom: 25px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1, h2, h3 {
  font-family: 'Nunito', sans-serif;
}

h1 {
  font-size: 22px;
  margin: 0;
  color: #111827;
  font-weight: 800;
  line-height: 1.3;
}

/* Options */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: capitalize;
  
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ক্লিক/ট্যাপের সময় তাৎক্ষণিক ফিডব্যাক (শুধু চাপা অবস্থায়) */
.option-btn:active {
  transform: translateX(3px) scale(0.98);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
  /* background ও border পরিবর্তন না করাই ভালো → .selected এর সাথে কনফ্লিক্ট হয় */
}

/* স্থায়ী সিলেকশন (যেটা থেকে যাবে) */
.option-btn.selected {
  border-color: #1e3a8a;          /* var(--primary) */
  background: #eff6ff;
  color: #1e3a8a;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* হোভার (ডেস্কটপের জন্য, মোবাইলে প্রায় কাজ করে না) */
.option-btn:hover:not(.selected):not(:active) {
  border-color: #cbd5e1;
  background: #f8fafc;
}
/* Icons */
.opt-icon {
  font-size: 22px;
  opacity: 0.7;
}

/* --- BUTTON GRADIENTS (Deep Blue to Blue) --- */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: white;
}

.next-btn {
  width: 100%;
  padding: 16px;
  margin-top: 25px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
  opacity: 0.5;
  pointer-events: none; /* Disabled until selection */
}

.next-btn.active {
  opacity: 1;
  pointer-events: auto;
}

.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px -1px rgba(30, 58, 138, 0.4);
}

.next-btn:active {
  transform: translateY(0);
}

/* --- LOGIN SCREEN STYLES --- */
.login-screen {
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.login-screen h2 {
  margin-bottom: 20px;
  color: var(--primary);
  font-weight: 800;
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  padding-right: 50px; /* Space for mic */
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: var(--primary);
}

.mic-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: var(--text-muted);
}

.mic-btn:hover {
  background: #f3f4f6;
  color: var(--primary);
}

.mic-btn.listening {
  color: var(--error);
  background: #fee2e2;
  animation: pulse 1.5s infinite;
}

.start-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.3);
}

.start-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* --- RESULT SCREEN STYLES --- */
.result-screen {
  text-align: center;
  animation: slideUp 0.5s ease;
}

.result-summary {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px dashed #e5e7eb;
}

.final-score {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: 10px 0;
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Share Button */
.whatsapp-btn {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  background-color: #25D366; /* WhatsApp Green */
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.3);
  transition: transform 0.1s;
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  background-color: #1ebc57;
}

.whatsapp-icon {
  width: 20px;
  height: 20px;
  fill: white;
}

.review-list {
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
  margin-bottom: 20px;
  padding-right: 5px;
}

.review-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 5px solid #cbd5e1;
  font-size: 14px;
}

.review-item.correct {
  border-left-color: var(--success);
  background: #f0fdf4;
}

.review-item.wrong {
  border-left-color: var(--error);
  background: #fef2f2;
}

.review-q {
  font-weight: 700;
  margin-bottom: 4px;
  color: #374151;
}

.review-ans {
  color: #64748b;
  font-size: 13px;
}

/* Scrollbar styling */
.review-list::-webkit-scrollbar {
  width: 6px;
}
.review-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hidden {
  display: none !important;
}