/* Main styles for the educational English app */

:root {
  /* Color palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --secondary-500: #8b5cf6;
  --accent-500: #f97316;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --error-500: #ef4444;
  
  --neutral-50: #f0f3e3;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  
  /* Spacing system (based on 8px) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  
  /* Typography */
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --line-height-body: 1.5;
  --line-height-heading: 1.2;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height-body);
  color: var(--neutral-800);
  background-color: linear-gradient(135deg, rgb(13, 171, 219), rgb(0, 110, 255));
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-heading);
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

button, .button {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  background-color: var(--primary-500);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover, .button:hover {
  background-color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active, .button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
/*footer */
.footer {
  background-color: white;
  padding: 15px;
  text-align: left;
  color: white;;
  font-size: 0.575rem;
  height: 10px;

}
/* Header */
.header {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-600);
}

.home-icon {
  font-size: 1.5rem;
  color: var(--primary-500);
  cursor: pointer;
  transition: color 0.2s ease;
}

.home-icon:hover {
  color: var(--primary-700);
}

/* Landing page */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80vh;
  padding: var(--space-8) 0;
  background: linear-gradient(135deg, var(--primary-50), var(--neutral-100));
  position: relative;
  overflow: hidden;
}

.welcome-box {
  background-color: rgb(253, 249, 249);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  max-width: 600px;
  width: 100%;
  z-index: 2;
  transform: translateY(0);
  animation: float 6s ease-in-out infinite;
}

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

.welcome-title {
  color: var(--primary-700);
  margin-bottom: var(--space-4);
  font-size: 2.5rem;
}

.start-button {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
  margin-top: var(--space-6);
  background-color: var(--accent-500);
  position: relative;
  overflow: hidden;
}

.start-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1)
  );
  transition: all 1s;
}

.start-button:hover::before {
  left: 100%;
}

/* Animated background elements */
.bg-element {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  z-index: 1;
}

.bg-element-1 {
  background-color: var(--primary-300);
  width: 300px;
  height: 300px;
  top: -150px;
  left: -100px;
  animation: move-slow 15s infinite alternate;
}

.bg-element-2 {
  background-color: var(--secondary-500);
  width: 200px;
  height: 200px;
  bottom: -100px;
  right: 10%;
  animation: move-slow 20s infinite alternate-reverse;
}

.bg-element-3 {
  background-color: var(--accent-500);
  width: 150px;
  height: 150px;
  top: 20%;
  right: -50px;
  animation: move-slow 18s infinite alternate;
}

@keyframes move-slow {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* Exercise selector page */
.exercises-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  padding: var(--space-8) 0;
}

.exercise-tile {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 180px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.exercise-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.exercise-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-100);
}

.exercise-tile:hover::before {
  transform: scaleX(1);
}

.exercise-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--primary-700);
}

/* Exercise chapter selector */
.chapter-selector {
  max-width: 600px;
  margin: var(--space-8) auto;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: var(--space-8);
}

.selector-title {
  margin-bottom: var(--space-6);
  color: var(--primary-700);
  text-align: center;
}

.selector-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-weight: 500;
  color: var(--neutral-700);
}

.form-select {
  padding: var(--space-3);
  border: 1px solid var(--neutral-300);
  border-radius: 0.375rem;
  font-size: 1rem;
  background-color: white;
}

/* Exercise question pages */
.question-container {
  max-width: 800px;
  margin: var(--space-8) auto;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: var(--space-8);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--neutral-200);
}

.question-indicator {
  font-weight: 500;
  color: var(--neutral-600);
}

.question-box {
  background-color: var(--neutral-100);
  border-radius: 0.375rem;
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  font-size: 1.125rem;
}

.clue-box {
  background-color: var(--primary-50);
  border-left: 4px solid var(--primary-400);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.clue-title {
  font-weight: 600;
  color: var(--primary-700);
  margin-bottom: var(--space-2);
}

.clue-list {
  list-style-type: none;
}

.clue-item {
  margin-bottom: var(--space-2);
  padding-left: var(--space-4);
  position: relative;
}

.clue-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-500);
}

.answer-container {
  margin-bottom: var(--space-6);
}

.answer-title {
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.answer-spaces {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.answer-space {
  flex: 1;
  min-height: 100px;
  border: 2px dashed var(--neutral-400);
  border-radius: 0.375rem;
  padding: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-start;
  align-content: flex-start;
  background-color: var(--neutral-50);
}

.answer-space-title {
  width: 100%;
  text-align: center;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--neutral-600);
}

.answer-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.option-box {
  background-color: var(--neutral-100);
  border-radius: 0.375rem;
  padding: var(--space-4);
  min-height: 80px;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-start;
}

.option-title {
  width: 100%;
  text-align: center;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--neutral-600);
}

.word-item {
  background-color: white;
  border: 1px solid var(--primary-300);
  border-radius: 0.25rem;
  padding: var(--space-2) var(--space-3);
  cursor: move;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.word-item:hover {
  background-color: var(--primary-50);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-6);
}

.prev-button, .next-button {
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.prev-button {
  background-color: var(--neutral-200);
  color: var(--neutral-700);
}

.prev-button:hover {
  background-color: var(--neutral-300);
}

/* Gap in sentence for fill-in exercises */
.sentence-with-gap {
  position: relative;
  line-height: 2;
}

.word-gap {
  display: inline-block;
  min-width: 100px;
  height: 1.5em;
  border-bottom: 2px solid var(--primary-400);
  margin: 0 0.25em;
  position: relative;
  vertical-align: bottom;
}

.word-gap-target {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 0.25rem;
}

/* Feedback messages */
.feedback {
  text-align: center;
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border-radius: 0.375rem;
  animation: fade-in 0.5s ease;
}

.feedback-success {
  background-color: var(--success-500);
  color: white;
}

.feedback-error {
  background-color: var(--error-500);
  color: white;
}

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

/* Responsive styles */
@media (max-width: 768px) {
  .welcome-box {
    padding: var(--space-6);
    margin-bottom: var(--space-6);
  }
  
  .welcome-title {
    font-size: 2rem;
  }
  
  .exercises-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
  }
  
  .answer-spaces {
    flex-direction: column;
  }
  
  .question-container {
    padding: var(--space-4);
    margin: var(--space-4) auto;
  }
}

@media (max-width: 480px) {
  .welcome-box {
    padding: var(--space-4);
  }
  
  .welcome-title {
    font-size: 1.75rem;
  }
  
  .exercises-grid {
    grid-template-columns: 1fr;
  }
  
  .navigation-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }
}





/*for Yes no Exercise*/

.correct-placement {
  background-color: #e8f5e8;
  border: 2px solid #4CAF50;
  color: #2e7d32;
  padding: 12px;
}

.wrong-order-bounce {
  animation: wrongOrderBounce 0.8s ease-in-out;
  background-color: #ffcdd2;
  border: 2px solid #f44336;
  color: #b71c1c;
  padding: 15px;
}

.bounce-back-animation {
  animation: bounceBack 0.6s ease-out;
}

.invalid-bounce {
  animation: invalidShake 0.6s ease-in-out;
}

@keyframes wrongOrderBounce {
  0% { transform: scale(1); }
  25% { transform: scale(1.1); background-color: #ffcdd2; }
  50% { transform: scale(1.05); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 0.8; }
}

@keyframes bounceBack {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes invalidShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.valid-drop {
  background-color: #e3f2fd;
  border: 2px dashed #21f32c;
  color: #c8dd0f;
  padding: 12px;
}
.invalid-drop {
  background-color: #ffebee;
  border: 2px dashed #f44336;
}