:root {
  --siemens-cyan: #009999;
  --siemens-cyan-dark: #006666;
  --bg-color: #f4f6f7;
  --white: #ffffff;
  --text-main: #2c3e50;
  --red: #e74c3c;
  --green: #27ae60;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
}

header {
  background: linear-gradient(
    135deg,
    var(--siemens-cyan-dark),
    var(--siemens-cyan)
  );
  color: var(--white);
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 800px;
  margin: 30px auto;
  padding: 0 15px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  display: none; /* 默认隐藏 */
}
.card.active {
  display: block;
}

input[type="text"] {
  width: 100%;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 20px;
  outline: none;
  transition: border 0.3s;
}
input[type="text"]:focus {
  border-color: var(--siemens-cyan);
}

.btn {
  width: 100%;
  background-color: var(--siemens-cyan);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.btn:hover {
  background-color: var(--siemens-cyan-dark);
}
.submit-btn {
  margin-top: 30px;
}

/* 题目样式 */
.question-box {
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}
.question-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
}
.option-label {
  display: block;
  padding: 12px 15px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}
.option-label:hover {
  background: #e6f7f7;
}
input[type="radio"] {
  margin-right: 10px;
  accent-color: var(--siemens-cyan);
}

/* 结果区样式 */
.score-board {
  text-align: center;
  padding: 20px;
  background: #e6f7f7;
  border-radius: 8px;
  margin-bottom: 30px;
}
.score-display {
  font-size: 24px;
  font-weight: bold;
  color: var(--siemens-cyan-dark);
  margin-top: 10px;
}
.score-display span {
  font-size: 40px;
  color: var(--red);
}
.rank-display {
  font-size: 18px;
  margin-top: 10px;
  font-weight: bold;
  color: #d35400;
}

.leaderboard {
  background: #fef9e7;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #fad7a1;
}
.leaderboard h3 {
  color: #b9770e;
  margin-bottom: 15px;
  text-align: center;
}
.leaderboard li {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px dashed #f8c471;
  font-weight: bold;
}

/* 解析区 */
.review-item {
  background: #fafcfc;
  padding: 15px;
  border-left: 4px solid #ccc;
  margin-bottom: 15px;
  border-radius: 4px;
}
.review-item.correct {
  border-left-color: var(--green);
}
.review-item.wrong {
  border-left-color: var(--red);
}
.review-exp {
  background: #ebf5fb;
  padding: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: #2980b9;
}

/* Loader */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e6f7f7;
  border-top: 5px solid var(--siemens-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* 追加管理员后台样式 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}
.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}
.admin-table th {
  background: #34495e;
  color: white;
}
.admin-table tr:hover {
  background: #f8fafc;
}
.btn-delete {
  background: var(--red);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-delete:hover {
  background: #c0392b;
}
