@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
  --bg-gradient-start: #667eea;
  --bg-gradient-end: #764ba2;
  --container-bg: white;
  --text-color: #333;
  --text-muted: #6c757d;
  --border-color: #e9ecef;
  --primary-color: #667eea;
  --primary-hover: #5568d3;
  --secondary-color: #28a745;
  --secondary-hover: #218838;
  --danger-color: #dc3545;
  --danger-hover: #c82333;
  --option-bg: #f8f9fa;
  --option-hover: #e9ecef;
  --card-bg: white;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-light: rgba(0, 0, 0, 0.1);
  --modal-overlay: rgba(0, 0, 0, 0.6);
  --input-bg: #f8f9fa;
  --heading-color: #667eea;
  --stat-bg: #f8f9fa;
  --correct-bg: #d4edda;
  --correct-text: #155724;
  --correct-border: #c3e6cb;
  --wrong-bg: #f8d7da;
  --wrong-text: #721c24;
  --wrong-border: #f5c6cb;
  --sign-img-bg: #f8f9fa;
  --learn-header-bg: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

[data-theme="dark"] {
  --bg-gradient-start: #1a1a2e;
  --bg-gradient-end: #16213e;
  --container-bg: #24243e;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --border-color: #2a2a40;
  --primary-color: #768bfb;
  --primary-hover: #667eea;
  --secondary-color: #2ea043;
  --secondary-hover: #238636;
  --danger-color: #da3633;
  --danger-hover: #b62324;
  --option-bg: #2a2a40;
  --option-hover: #3a3a50;
  --card-bg: #2a2a40;
  --shadow-color: rgba(0, 0, 0, 0.6);
  --shadow-light: rgba(0, 0, 0, 0.3);
  --modal-overlay: rgba(0, 0, 0, 0.8);
  --input-bg: #1f1f30;
  --heading-color: #8b9dff;
  --stat-bg: #1f1f30;
  --correct-bg: #1e3a2a;
  --correct-text: #4cd964;
  --correct-border: #2a5a3b;
  --wrong-bg: #3a1e1e;
  --wrong-text: #ff5f57;
  --wrong-border: #5a2a2a;
  --sign-img-bg: #ffffff;
  /* Keep images on white or light bg if transparent, but they seem to be rectangular jpgs mostly? If transparent, white is safer. If they are photos, it doesn't matter. */
  --learn-header-bg: linear-gradient(135deg, #2a2a40 0%, #1f1f30 100%);
}


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

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  color: var(--text-color);
}

.container {
  background: var(--container-bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px var(--shadow-color);
  width: 100%;
  max-width: 500px;
  padding: 15px;
  max-height: 100vh;
  overflow-y: auto;
}

.landing-container {
  text-align: center;
}

.hero-logo {
  width: 100%;
  max-width: 450px;
  height: 180px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

h1 {
  color: var(--heading-color);
  font-size: 1.5rem;
  margin-bottom: 30px;
  line-height: 1.4;
}

.quiz-type-selector {
  margin: 25px 0;
}

.quiz-type-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

@media (min-width: 600px) {
  .quiz-type-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
}

.quiz-type-btn {
  background: var(--option-bg);
  border: 3px solid var(--border-color);
  border-radius: 15px;
  padding: 12px 15px;
  min-height: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.quiz-type-btn:hover {
  background: var(--option-hover);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.quiz-type-btn.active {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.quiz-icon {
  font-size: 2rem;
  display: inline-block;
  flex-shrink: 0;
}

.quiz-name {
  display: inline-block;
  font-size: 1.05rem;
  white-space: nowrap;
}

.question-selector {
  margin: 20px 0;
}

/* Features Section */
.features-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
}

.feature-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.feature-btn {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: right;
  font-family: 'Cairo', sans-serif;
  width: 100%;
}

.feature-btn:hover {
  background: linear-gradient(135deg, var(--option-bg) 0%, var(--container-bg) 100%);
  border-color: var(--primary-color);
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-grow: 1;
}

.feature-text strong {
  color: var(--text-color);
  font-size: 1.05rem;
  font-weight: 600;
}

.feature-text small {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.question-dropdown {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
}

.question-dropdown:hover {
  background: var(--option-hover);
  border-color: var(--primary-color);
}

.question-dropdown:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.question-option {
  background: var(--option-bg);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 15px;
  margin: 10px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.question-option:hover {
  background: var(--option-hover);
  transform: translateY(-2px);
}

.question-option.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  width: 100%;
  font-weight: bold;
  font-family: 'Cairo', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-icon {
  font-size: 1.3rem;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
}

/* Test Page Styles */
.test-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.top-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.btn-finish {
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.btn-finish:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.stats-bar {
  background: var(--stat-bg);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-around;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.stat-value {
  font-weight: bold;
  color: var(--text-color);
  font-size: 1rem;
}

.question-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sign-image {
  width: 100%;
  max-width: 160px;
  height: 160px;
  object-fit: contain;
  margin: 10px auto;
  display: block;
  border-radius: 8px;
  background: var(--sign-img-bg);
  padding: 8px;
}

.question-text {
  background: linear-gradient(135deg, var(--option-bg) 0%, var(--container-bg) 100%);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px 15px;
  margin: 10px auto;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading-color);
  line-height: 1.6;
  max-width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.options {
  margin: 10px 0;
}

.option {
  background: var(--option-bg);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  color: var(--text-color);
}

.option:hover:not(.disabled) {
  background: var(--option-hover);
}

.option.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.option.correct {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.option.wrong {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.option.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.action-buttons .btn {
  margin: 0;
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
}

/* Results Page Styles */
.results-container {
  text-align: center;
}

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 30px auto;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.score-percentage {
  font-size: 3rem;
  font-weight: bold;
}

.score-label {
  font-size: 0.9rem;
  margin-top: 5px;
}

.score-details {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

.score-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.1rem;
}

.score-row:last-child {
  border-bottom: none;
}

.score-row .label {
  color: var(--text-muted);
}

.score-row .value {
  font-weight: bold;
  color: var(--text-color);
}

.correct-value {
  color: var(--secondary-color);
}

.wrong-value {
  color: var(--danger-color);
}

.results-ad {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: white;
  font-family: 'Cairo', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  padding: 20px;
  border-radius: 15px;
  margin: 25px 0;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.results-ad p {
  margin: 3px 0;
}

/* Review Page Styles */
.review-container h1 {
  margin-bottom: 20px;
}

.mistake-item {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  border: 2px solid var(--border-color);
}

.mistake-sign {
  width: 100%;
  max-width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 10px auto;
  display: block;
  background: var(--sign-img-bg);
  border-radius: 10px;
  padding: 10px;
}

.mistake-details {
  margin-top: 10px;
}

.mistake-label {
  font-weight: bold;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

.mistake-answer {
  padding: 10px;
  border-radius: 5px;
  margin: 5px 0;
  font-size: 1rem;
}

.mistake-answer.wrong {
  background: var(--wrong-bg);
  color: var(--wrong-text);
  border: 1px solid var(--wrong-border);
}

.mistake-answer.correct {
  background: var(--correct-bg);
  color: var(--correct-text);
  border: 1px solid var(--correct-border);
}

/* Star Animation */
@keyframes starPop {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.5) rotate(180deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

.star-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  animation: starPop 0.6s ease-out;
  z-index: 1000;
  pointer-events: none;
}

/* Sad Animation */
@keyframes sadShake {

  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  20% {
    transform: translate(-50%, -50%) rotate(-10deg);
  }

  40% {
    transform: translate(-50%, -50%) rotate(10deg);
  }

  60% {
    transform: translate(-50%, -50%) rotate(-10deg);
  }

  80% {
    transform: translate(-50%, -50%) rotate(10deg);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
  }
}

.sad-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  animation: sadShake 0.6s ease-out;
  z-index: 1000;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-height: 700px) {
  .sign-image {
    max-width: 130px;
    height: 130px;
    margin: 8px auto;
  }

  h1 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .option {
    padding: 8px;
    font-size: 0.9rem;
    margin: 4px 0;
  }

  .stats-bar {
    padding: 6px;
    margin-bottom: 8px;
    font-size: 0.8rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-value {
    font-size: 0.9rem;
  }

  .action-buttons {
    margin-top: 8px;
  }

  .action-buttons .btn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px var(--shadow-color);
  animation: slideIn 0.3s ease;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-body {
  padding: 25px;
  text-align: center;
}

.modal-body p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
}

.modal-footer {
  padding: 15px 25px 25px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-footer .btn {
  margin: 0;
  flex: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

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

.footer a:hover {
  text-decoration: underline;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #25D366;
  text-decoration: none;
  transition: all 0.3s ease;
}

.whatsapp-link:hover {
  color: #128C7E;
  text-decoration: none;
}

.whatsapp-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* Learn Page Styles */
.learn-container {
  max-width: 1200px;
  padding: 20px;
}

.learn-header {
  margin-bottom: 35px;
  background: var(--learn-header-bg);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 10px var(--shadow-light);
}

.learn-header h1 {
  color: var(--heading-color);
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
}

.learn-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.learn-actions .btn,
.learn-actions .btn-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  margin: 0;
  font-size: 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  white-space: nowrap;
  height: 52px;
  width: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-toggle {
  background: #667eea;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-toggle:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.learn-actions .btn-secondary:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.signs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.sign-card {
  background: white;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #f0f0f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sign-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

.sign-card-image-wrapper {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.sign-card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
}

.sign-card-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sign-card-content {
  position: relative;
  height: 70px;
  overflow: hidden;
}

.sign-card-name,
.sign-card-hint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(10px);
  padding: 15px;
  font-family: 'Cairo', sans-serif;
}

.sign-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
  background: linear-gradient(to bottom, rgba(102, 126, 234, 0.12), rgba(102, 126, 234, 0.08));
  border-top: 2px solid rgba(102, 126, 234, 0.15);
}

.sign-card-name.visible {
  opacity: 1;
  transform: translateY(0);
}

.sign-card-hint {
  font-size: 0.85rem;
  font-weight: 500;
  color: #667eea;
  background: linear-gradient(to bottom, rgba(248, 249, 250, 0.95), rgba(233, 236, 239, 0.9));
  border-top: 2px solid rgba(0, 0, 0, 0.06);
}

.sign-card-hint.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive grid */
@media (max-width: 1200px) {
  .signs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .signs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .sign-card-image-wrapper {
    height: 150px;
    padding: 12px;
  }
}

@media (max-width: 600px) {
  .signs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .sign-card-image-wrapper {
    height: 140px;
    padding: 12px;
  }

  .sign-card-content {
    height: 60px;
  }

  .sign-card-name,
  .sign-card-hint {
    font-size: 0.8rem;
    height: 60px;
    padding: 10px;
  }

  .learn-header {
    padding: 20px;
  }

  .learn-header h1 {
    font-size: 1.5rem;
  }

  .learn-actions {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .learn-actions .btn,
  .learn-actions .btn-toggle {
    font-size: 0.9rem;
    padding: 12px 16px;
    height: 48px;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .signs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Countdown Modal */
.countdown-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  backdrop-filter: blur(10px);
}

.countdown-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.countdown-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.countdown-ad {
  color: white;
  font-family: 'Cairo', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease;
}

.countdown-ad p {
  margin: 5px 0;
}

.countdown-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.5s ease;
  padding: 20px;
}

.countdown-number {
  font-size: 4rem;
  font-weight: bold;
  color: #667eea;
  font-family: 'Cairo', sans-serif;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  word-wrap: break-word;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes countdownPulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.countdown-pulse {
  animation: countdownPulse 0.6s ease;
}

/* Ensure no scrolling on mobile */
@media (max-width: 500px) {
  .container {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
    padding: 15px;
  }

  body {
    padding: 0;
  }

  .hero-logo {
    width: 100%;
    max-width: 100%;
    height: 130px;
  }

  .quiz-type-btn {
    padding: 15px 10px;
    gap: 8px;
  }

  .quiz-icon {
    font-size: 1.8rem;
  }

  .quiz-name {
    font-size: 0.95rem;
  }

  .countdown-circle {
    width: 260px;
    height: 260px;
    padding: 15px;
  }

  .countdown-number {
    font-size: 2.5rem;
  }

  .countdown-ad {
    font-size: 1.3rem;
  }

  .results-ad {
    font-size: 1.1rem;
    padding: 15px;
    margin: 20px 0;
  }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  margin: 15px auto 0;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-color);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 6px 15px var(--shadow-color);
}

/* Performance Indicator Styles */
.performance-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideDown 0.3s ease;
}

.performance-indicator.incorrect {
  background: var(--wrong-bg);
  border: 2px solid var(--wrong-border);
  color: var(--wrong-text);
}

.performance-indicator .indicator-icon {
  font-size: 1.1rem;
}

.performance-indicator .indicator-text {
  font-family: 'Cairo', sans-serif;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Errors Badge */
.errors-badge {
  background: white;
  color: var(--danger-color);
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 8px;
}