@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --primary-blue: #1e3a8a;
  --light-blue: #dbeafe;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --gradient-dark: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --hover-green: linear-gradient(135deg, #059669, #047857);
  --easy: #10b981;
  --easy-hover: #34d399;
  --medium: #0ea5e9;
  --hard: #1e293b;
  --hard-hover: #334155;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Roboto", sans-serif;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom right, #e6f0ff, #ffffff);
  font-family: "Inter", sans-serif;
  transition: background-color 0.5s ease;
}

header {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 24px;
  gap: 16px;
  justify-content: flex-start;
  background-color: transparent;
  z-index: 1000;
}

.logo {
  height: 60px;
  width: auto;
  max-width: 150px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

h1, h1.emoji {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-dark);
  background: var(--gradient-dark);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  text-align: center;
  margin-top: 20px;
}

h1.emoji {
  font-size: 36px;
}

.para1, .para2 {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 20px auto;
  max-width: 800px;
}

.para1 {
  color: #475569;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
}

.para2 {
  color: var(--text-light);
  font-size: 20px;
  font-weight: 400;
  margin: 30px 15px 50px 15px;
}

.subjectSelection {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 30px 0;
}

.subjectline {
  position: relative;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: 1.5px solid #3b82f6;
  background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
  color: #1e40af; /* Blue-800 */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  min-width: 140px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  z-index: 0;
}

.subjectline:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
  border-color: #1d4ed8;
}

/* Light shine animation */
.subjectline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.1)
  );
  transform: skewX(-20deg);
  z-index: 1;
  transition: left 0.6s ease;
}

.subjectline:hover::before {
  left: 130%;
}

.subjectline:active {
  transform: scale(0.97);
}

.subjectline.selected {
  background: linear-gradient(135deg, #bfdbfe, #60a5fa);
  color: #1e3a8a; /* Blue-900 */
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}


main.content, .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.difficulty-section {
  margin-top: 40px;
  text-align: center;
}

.difficulty-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.difficultySelection {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.difficulty {
  background-color: #f9fbfd;
  color: #1e293b; /* Slate-800 */
  border: 1.5px solid #d1d5db;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.difficulty[data-level="Easy"] {
  background-color: #ecfdf5;
  color: #065f46; /* Emerald-800 */
  border-color: #a7f3d0;
}

.difficulty[data-level="Medium"] {
  background-color: #e0f2fe;
  color: #0369a1; /* Sky-800 */
  border-color: #bae6fd;
}

.difficulty[data-level="Hard"] {
  background-color: #fef2f2;
  color: #991b1b; /* Red-800 */
  border-color: #fecaca;
}

/* Hover Styles */
.difficulty[data-level="Easy"]:hover {
  background-color: #d1fae5;
  color: #064e3b;
}

.difficulty[data-level="Medium"]:hover {
  background-color: #bae6fd;
  color: #075985;
}

.difficulty[data-level="Hard"]:hover {
  background-color: #fecaca;
  color: #7f1d1d;
}

/* Selected */
.difficulty.selected {
  background: linear-gradient(to right, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* Active press */
.difficulty:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}


.start-quiz-container {
  text-align: center;
  margin-top: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
}

#startQuizBtn {
  background: var(--gradient-green);
  color: white;
  font-size: 20px;
  padding: 14px 36px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  max-width: 280px;
  width: 90%;
}

#startQuizBtn:hover {
  background: var(--hover-green);
}

footer {
  text-align: center;
  padding: 15px 0;
  background: var(--primary-blue);
  color: white;
  font-size: 0.9rem;
}

/* === MEDIA QUERIES === */
@media (max-width: 1024px) {
  h1 {
    font-size: 36px;
  }
  .para1 {
    font-size: 24px;
  }
  .para2 {
    font-size: 18px;
  }
  .difficulty {
    font-size: 16px;
    padding: 10px 24px;
  }
  #startQuizBtn {
    font-size: 18px;
    padding: 12px 28px;
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 36px;
  }
  .para1 {
    font-size: 24px;
  }
  .para2 {
    font-size: 18px;
  }
  .difficulty {
    font-size: 16px;
    padding: 10px 24px;
  }
  .subjectline {
    font-size: 15px;
    padding: 12px 20px;
  }
  #startQuizBtn {
    font-size: 18px;
    padding: 12px 28px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
  }
  .logo {
    height: 50px;
    margin-bottom: 10px;
  }
  .subjectSelection {
    flex-direction: column;
    gap: 12px;
  }
  .subjectline {
    width: 100%;
    font-size: 15px;
    padding: 12px 16px;
  }
  .difficultySelection {
    flex-direction: column;
    gap: 12px;
  }
  .para1, .para2 {
    padding: 0 15px;
    font-size: 16px;
  }
  #startQuizBtn {
    width: 100%;
  }
  footer {
    font-size: 0.8rem;
    padding: 10px 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  .para1 {
    font-size: 18px;
  }
  .para2 {
    font-size: 14px;
    margin: 10px 15px;
  }
  .difficulty {
    font-size: 15px;
    padding: 10px 18px;
  }
  .subjectline {
    font-size: 14px;
    padding: 10px 14px;
  }
  .logo {
    height: 44px;
  }
  #startQuizBtn {
    font-size: 16px;
    padding: 10px 20px;
  }
}



