* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* ─── ANIMATIONS ─── */
.fade {
  animation: fadeIn 0.7s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.slide {
  animation: slideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { transform: translateY(50px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ─── SCREEN ─── */
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 16px 24px;
}

#start  { background: url("bg1.jpg") center/cover no-repeat fixed; }
#quiz   { background: url("bg2.jpg") center/cover no-repeat fixed; }
#result { background: url("bg3.jpg") center/cover no-repeat fixed; }

/* ─── CARD ─── */
.card {
  background: rgba(0, 0, 0, 0.75);
  padding: 28px 22px;
  border-radius: 20px;
  text-align: center;
  color: white;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 0 32px rgba(255, 165, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  z-index: 999;
}

.navbar div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar button {
  padding: 7px 14px;
  font-size: 13px;
  margin: 0;
  border-radius: 16px;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 16px;
  transition: background 0.2s;
}

.navbar a:hover {
  background: rgba(255,255,255,0.1);
}

.logo {
  height: 26px;
  object-fit: contain;
}

/* ─── BUTTONS ─── */
button {
  padding: 12px 24px;
  margin: 6px 4px;
  border-radius: 24px;
  border: none;
  background: orange;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
  font-size: 15px;
  font-weight: bold;
  min-height: 44px;
}

button:hover {
  background: #e05000;
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(255,100,0,0.5);
}

button:active {
  transform: scale(0.97);
}

/* ─── ANSWER BUTTONS ─── */
#answers button {
  display: block;
  width: 100%;
  margin: 8px 0;
  text-align: left;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: normal;
  border-radius: 14px;
  line-height: 1.4;
  min-height: 50px;
}

#answers button:hover:not(:disabled) {
  background: #cc7700;
  transform: scale(1.02);
  box-shadow: 0 0 8px rgba(255,165,0,0.4);
}

/* ─── CORRECT / WRONG ─── */
.correct {
  background: #16a34a !important;
  box-shadow: 0 0 14px #16a34a80 !important;
  transform: scale(1.02) !important;
}

.wrong {
  background: #dc2626 !important;
  box-shadow: 0 0 14px #dc262680 !important;
}

/* ─── HIDDEN ─── */
.hidden { display: none; }

/* ─── ROBOT ─── */
.robot {
  width: 100px;
  margin: 10px auto;
  display: block;
  animation: float 2s infinite ease-in-out;
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* ─── SOCIAL ─── */
.social {
  position: fixed;
  right: 14px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  transition: background 0.2s, transform 0.2s;
}

.social a:hover {
  background: rgba(255,165,0,0.5);
  transform: scale(1.15);
}

/* ─── META BAR ─── */
.metabar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── LEVEL INDICATOR ─── */
#levelIndicator {
  font-size: 13px;
  font-weight: bold;
  color: orange;
  background: rgba(255, 165, 0, 0.12);
  border: 1px solid rgba(255, 165, 0, 0.35);
  border-radius: 20px;
  padding: 5px 14px;
  letter-spacing: 0.4px;
}

/* ─── STREAK ─── */
#streakDisplay {
  display: none;
  font-size: 13px;
  font-weight: bold;
  color: #ff6b00;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 20px;
  padding: 5px 14px;
  animation: streakPop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes streakPop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ─── TOPBAR ─── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

/* ─── PROGRESS BAR ─── */
#progress {
  height: 8px;
  flex: 1;
  background: lime;
  border-radius: 5px;
  width: 0%;
  transition: width 0.4s ease;
}

/* ─── TIMER ─── */
.timer-box {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.timer-box svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.timer-box circle {
  fill: none;
  stroke-width: 5;
  stroke: rgba(255, 255, 255, 0.2);
}

#progressCircle {
  stroke: orange;
  stroke-dasharray: 176;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-box #timer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: bold;
  color: white;
}

/* ─── QUESTION ─── */
#question {
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 14px;
  min-height: 44px;
}

/* ─── STARS ─── */
.stars-display {
  font-size: 28px;
  letter-spacing: 4px;
  margin: 8px 0 4px;
  animation: starPop 0.5s ease;
}

@keyframes starPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.final-score {
  font-size: 20px;
  font-weight: bold;
  color: orange;
  margin-top: 8px;
}

/* ─── LEVEL BADGE ─── */
#levelBadge {
  display: inline-block;
  margin: 10px auto 4px;
  background: rgba(255, 165, 0, 0.18);
  border: 1.5px solid rgba(255, 165, 0, 0.5);
  border-radius: 30px;
  padding: 6px 20px;
  font-size: 15px;
  font-weight: bold;
  color: orange;
  letter-spacing: 0.5px;
  animation: fadeIn 0.5s ease;
}

/* ─── RESULT SCORE ─── */
#score {
  font-size: 17px;
  margin: 6px 0 12px;
  color: #f0f0f0;
}

/* ══════════════════════════════════
   MOBILE  (max 480px)
══════════════════════════════════ */
@media (max-width: 480px) {

  .screen {
    padding: 76px 12px 20px;
    align-items: flex-start;
  }

  #start .card,
  #result .card {
    margin: auto;
  }

  .card {
    padding: 18px 14px;
    border-radius: 16px;
    max-width: 100%;
  }

  h1 { font-size: 20px; }

  #question {
    font-size: 15px;
    line-height: 1.5;
  }

  #answers button {
    font-size: 14px;
    padding: 13px 13px;
    margin: 5px 0;
    min-height: 48px;
    border-radius: 12px;
  }

  #levelIndicator,
  #streakDisplay {
    font-size: 11px;
    padding: 4px 10px;
  }

  .timer-box,
  .timer-box svg {
    width: 48px;
    height: 48px;
  }

  .timer-box #timer { font-size: 13px; }

  button {
    font-size: 14px;
    padding: 11px 18px;
  }

  .navbar button {
    padding: 6px 10px;
    font-size: 12px;
  }

  .navbar a {
    font-size: 12px;
    padding: 6px 8px;
  }

  .logo { height: 22px; }

  .robot { width: 80px; }

  .stars-display { font-size: 24px; }
  .final-score   { font-size: 17px; }

  .social {
    right: 8px;
    bottom: 14px;
    gap: 8px;
  }

  .social a {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  #levelBadge {
    font-size: 13px;
    padding: 5px 14px;
  }
}

/* ══════════════════════════════════
   TABLET  (481px – 768px)
══════════════════════════════════ */
@media (min-width: 481px) and (max-width: 768px) {
  .card { max-width: 500px; }

  #answers button {
    font-size: 15px;
    padding: 14px 16px;
  }
}

/* ══════════════════════════════════
   DESKTOP  (769px+)
══════════════════════════════════ */
@media (min-width: 769px) {
  .card {
    max-width: 480px;
    padding: 32px 28px;
  }

  #question { font-size: 17px; }

  #answers button {
    font-size: 15px;
    padding: 14px 18px;
  }

  #answers button:hover:not(:disabled) {
    transform: translateX(4px) scale(1.01);
  }
}