* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial Rounded MT Bold", "Segoe UI", sans-serif;
}
a {
  text-decoration: none;
}

body {
  background: linear-gradient(135deg, #daf0db, #ebf3ec);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  color: #005684;
}

#app {
  width: 90%;
}
.index {
  padding-top: 0px;
}

.container {
  max-width: 100%;
  width: 100%;
  background: #e5f3e4;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 15px;
  position: relative;
}

.header {
  text-align: center;
  margin-bottom: 10px;
  padding: 1px;
  position: relative;
}

.title {
  font-size: 2.8rem;
  /* margin-bottom: 10px; */
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  background: linear-gradient(to right, #ff9966, #ff5e62);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 60%;
  margin: 0 auto;
  line-height: 1.6;
  color: #005684;
}

.start-btn {
  position: fixed;
  bottom: 5%;
  left: 44%;
  cursor: pointer;
  z-index: 1;
}

.start-btn .option-btn {
  font-size: 2.8rem;
  font-weight: bolder;
  border: 4px solid #005684;
  padding: 15px 25px;
  /* background: rgba(0, 0, 0, 0.1); */
}

.progress-container {
  background: rgba(255, 255, 255, 0.1);
  height: 20px;
  border-radius: 10px;
  margin: 10px auto;
  max-width: 800px;
  overflow: hidden;
  display: flex;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #4facfe, #00f2fe);
  border-radius: 10px;
  width: 20%;
  transition: width 0.5s ease;
}

.game-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.player-panel {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 450px;
}

.player-panel.active {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px #4ffe66;
}

.player-panel.true {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px #4ffe66;
}
.player-panel.false {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px #f71909;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  /* margin-bottom: 20px; */
}

.player-title {
  font-size: 1.6rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.player-title::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
}

.player-1 .player-title::before {
  background: #06cbf6;
}
.player-2 .player-title::before {
  background: #bd0607;
}
.player-3 .player-title::before {
  background: #f3b70b;
}
.player-4 .player-title::before {
  background: #33be00;
}

.player-score {
  font-size: 1.8rem;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 15px;
  border-radius: 50px;
}

.question-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
}

.question-text {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
  /* color: #ffd166; */
  /* color: linear-gradient(to right, #ff9966, #ff5e62); */
}

.question-image {
  text-align: center;
  margin: 15px 0;
}

.question-image img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.options-disabled {
  display: none !important;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.inputs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.inputs-disabled {
  display: none !important;
}
input {
  padding: 8px;
  margin-right: 10px;
  font-size: 16px;
}

.option-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #005684;
  border-radius: 12px;
  padding: 12px;
  color: #005684 !important;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.option-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #005684;
  border-radius: 12px;
  padding: 12px;
  color: #005684;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.option-btn:active {
  transform: translateY(0);
}

.character-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  min-height: 300px;
}

.ground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(to top, #8b4513, #654321);
  border-top-left-radius: 50% 20px;
  border-top-right-radius: 50% 20px;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.3);
}

.character {
  position: relative;
  width: 350px;
  z-index: 10;
  transition: transform 0.5s ease;
}

.character img {
  width: 100%;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.4));
}

.character.jumping {
  animation: jump 0.8s cubic-bezier(0.5, 1.5, 0.5, 1);
}
.car-image {
  transition: all 0.3s;
  transform-origin: bottom center;
}

.score-bubble {
  position: absolute;
  top: 30px;
  left: 95.5%;
  transform: translateX(-50%);
  background: #ffeb3b;
  color: #333;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.3rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  animation: floatUp 1.2s forwards;
  z-index: 20;
}

.final-rank {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.final-title {
  font-size: 3.5rem;
  margin-bottom: 40px;
  color: #ffd166;
  text-shadow: 0 0 15px rgba(255, 209, 102, 0.7);
}

.rank-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px 40px;
  border-radius: 15px;
  margin: 15px 0;
  font-size: 2.2rem;
  min-width: 400px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.rank-item:hover {
  transform: scale(1.05);
}

.rank-1 {
  background: linear-gradient(to right, #ffd700, #ffa500);
  color: #000;
}

.rank-2 {
  background: linear-gradient(to right, #c0c0c0, #a9a9a9);
  color: #000;
}

.rank-3 {
  background: linear-gradient(to right, #cd7f32, #a0522d);
  color: #000;
}

.rank-4 {
  color: #fff;
}

.restart-btn {
  margin-top: 40px;
  padding: 15px 40px;
  font-size: 1.5rem;
  background: linear-gradient(to right, #4facfe, #00f2fe);
  border: none;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.restart-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

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

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px);
  }
}

@media (max-width: 900px) {
  .game-container {
    flex-direction: column;
  }

  .player-panel {
    min-height: 400px;
  }
}

/* 在CSS中添加按钮样式 */
.fullscreen-btn {
  position: fixed;
  bottom: 20px;
  right: 10px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.15);
  /* color: white; */
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  z-index: 999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.fullscreen-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
}

.restart {
  bottom: 90px;
}

.check-panel table {
  position: absolute;
  z-index: 999;
  top: 23%;
  left: 20%;
  color: #000000;
  font-size: 1.6rem;
  text-align: center;
  background-color: rgba(218, 240, 219, 0.96);
}
.check-panel table th {
  padding: 10px;
}
.check-panel table td {
  padding: 5px 10px;
}
.close-btn {
  color: #fff;
  bottom: 94%;
  top: 1%;
}
.err {
  color: red;
}

.open-btn {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #a8d0e6;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.open-btn:hover {
  background-color: #8fb7d6;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* 半透明背景 */
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  max-width: 700px;
  width: 90%;
  text-align: left;
  height: 500px;
}

.modal-content h1 {
  margin-top: 0;
  color: #333;
}

.modal-content ul {
  padding-left: 20px;
  line-height: 2;
  color: #555;
  list-style: none;
  font-size: 1.2rem;
}

.modal-content .start-btn {
  position: relative;
  bottom: 0;
  left: 0;
  align-items: center;
  text-align: center;
  padding: 20px;
}
