* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
  overflow-x: hidden;
}

/* ================================= */
/* HOME PAGE */
/* ================================= */

.home-screen {
  width: 100%;
  min-height: 100vh;
  background:
    linear-gradient(135deg, #dbeafe, #eef2ff);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.circle1 {
  width: 350px;
  height: 350px;
  background: rgba(37, 99, 235, 0.18);
  top: -100px;
  left: -100px;
}

.circle2 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.15);
  bottom: -150px;
  right: -100px;
}

.home-card {
  width: 100%;
  max-width: 950px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  position: relative;
  z-index: 10;
}

.logo-badge {
  width: 85px;
  height: 85px;
  background: linear-gradient(to bottom right,
  #2563eb,
  #7c3aed);
  border-radius: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
  margin: auto;
  margin-bottom: 25px;
}

.home-title {
  text-align: center;
  font-size: 64px;
  font-weight: bold;
  color: #111827;
}

.home-subtitle {
  text-align: center;
  font-size: 20px;
  color: #6b7280;
  margin-top: 10px;
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 18px;
  margin-bottom: 35px;
}

.feature-box {
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.feature-box h3 {
  margin-bottom: 10px;
}

.feature-box p {
  color: #6b7280;
  line-height: 1.5;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 18px;
}

.menu-section {
  margin-bottom: 15px;
}

.menu-section label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.menu-select {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: 2px solid #d1d5db;
  background: white;
  font-size: 16px;
}

.home-buttons {
  display: flex;
  gap: 16px;
  margin-top: 35px;
}

.home-btn {
  flex: 1;
  border: none;
  padding: 18px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 17px;
  font-weight: bold;
  transition: 0.2s;
}

.home-btn:hover {
  transform: translateY(-2px);
}

.start-btn {
  background: linear-gradient(to right,
  #2563eb,
  #4f46e5);
  color: white;
}

.editor-btn {
  background: white;
  border: 2px solid #d1d5db;
}

/* ================================= */
/* QUIZ */
/* ================================= */

.app {
  display: flex;
  height: 100vh;
  gap: 12px;
  padding: 12px;
}

.panel {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quiz-panel {
  flex: 1.2;
  display: flex;
  flex-direction: column;
}

.game-panel {
  flex: 0.8;
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.badge {
  background: #eef2ff;
  color: #4338ca;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: bold;
}

.warning {
  background: #fee2e2;
  color: #991b1b;
}

.question {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 30px;
  line-height: 1.4;
}

.answers {
  display: grid;
  gap: 15px;
}

.answer-btn {
  border: none;
  background: #f3f4f6;
  padding: 20px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  text-align: left;
  transition: 0.2s;
}

.answer-btn:hover {
  background: #dbeafe;
  transform: translateY(-2px);
}

.anti-cheat-box {
  margin-top: 30px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 18px;
  border-radius: 16px;
  line-height: 1.6;
}

/* ================================= */
/* GAME */
/* ================================= */

.game-title {
  font-size: 24px;
  font-weight: bold;
}

.game-description {
  color: #6b7280;
  margin-top: 8px;
  margin-bottom: 20px;
}

.game-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* CUP GAME */

.cups-container {
  display: flex;
  gap: 25px;
}

.cup {
  width: 90px;
  height: 120px;
  background: linear-gradient(to bottom,
  #ef4444,
  #b91c1c);
  border-radius: 14px 14px 28px 28px;
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}

.cup:hover {
  transform: translateY(-4px);
}

.ball {
  width: 22px;
  height: 22px;
  background: gold;
  border-radius: 50%;
  position: absolute;
  bottom: -35px;
  left: 34px;
}

/* QTE */

.qte-container {
  width: 100%;
  max-width: 400px;
}

.target-key {
  text-align: center;
  font-size: 80px;
  font-weight: bold;
  color: #2563eb;
  margin-bottom: 20px;
}

.gauge-box {
  width: 100%;
  height: 35px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  width: 100%;
  background:
    linear-gradient(to right,
    #22c55e,
    #16a34a);
}

/* LOG */

.log-area {
  height: 220px;
  background: #111827;
  color: white;
  border-radius: 16px;
  padding: 14px;
  overflow-y: auto;
  font-size: 13px;
}

/* RESULTS */

.results-screen {
  display: none;
}

.results-box {
  background: #f3f4f6;
  padding: 25px;
  border-radius: 18px;
  margin-top: 20px;
}

.result-item {
  margin-bottom: 15px;
  font-size: 20px;
}

.highlight {
  color: #2563eb;
  font-weight: bold;
}

/* WARNING */

.flash-warning {
  position: fixed;
  inset: 0;
  background: rgba(220,38,38,0.92);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  font-size: 40px;
  text-align: center;
  font-weight: bold;
}

/* ================================= */
/* EDITOR */
/* ================================= */

.editor-screen {
  width: 100%;
  min-height: 100vh;
  background: #f3f4f6;
  padding: 30px;
}

.editor-container {
  max-width: 1100px;
  margin: auto;
  background: white;
  border-radius: 24px;
  padding: 35px;
}

.editor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.back-btn {
  border: none;
  background: #ef4444;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
}

.editor-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.question-edit-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.question-edit-card input {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

.add-question-box {
  margin-top: 40px;
  padding: 25px;
  background: #eef2ff;
  border-radius: 18px;
}

.add-question-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

/* RESPONSIVE */

@media (max-width: 900px) {

  .app {
    flex-direction: column;
    height: auto;
  }

  .home-title {
    font-size: 48px;
  }

  .question {
    font-size: 24px;
  }

  .target-key {
    font-size: 60px;
  }
}
