* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: background 0.8s ease, color 0.8s ease;
  background: linear-gradient(120deg, #1a1a2e, #16213e, #0f3460);
  color: #fff;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin-bottom: 20px;
}
@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.page-animate {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-animate {
  animation: slideIn 0.3s ease forwards;
  opacity: 0;
  transform: translateX(-10px);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.option.selected {
  animation: pulse 0.5s ease;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.container {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}

h1 {
  text-align: center;
  font-size: 28px;
  letter-spacing: 2px;
  margin-bottom: 30px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 25px;
}

h4 {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

button {
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: rgba(100, 150, 255, 0.2);
  color: #fff;
  position: relative;
  overflow: hidden;
}
button:hover {
  background: rgba(100, 150, 255, 0.4);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
button:active {
  transform: translateY(0) scale(0.98);
}

.option {
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
.option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}
.option.selected {
  background: rgba(100, 150, 255, 0.3);
  border-color: rgba(150, 200, 255, 0.8);
  font-weight: bold;
}

.analysis-box {
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  line-height: 1.6;
  font-size: 15px;
  border-left: 3px solid #6495ed;
}

.copyable {
  line-height: 1.8;
  font-size: 17px;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  min-height: 120px;
  white-space: pre-line;
  background: rgba(0, 0, 0, 0.2);
  cursor: copy;
  transition: all 0.3s ease;
}
.copyable:hover {
  background: rgba(0, 0, 0, 0.25);
}
.copy-tip {
  text-align: center;
  color: #4ade80;
  margin-bottom: 20px;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

#prev-btn {
  background: rgba(255, 255, 255, 0.1);
}

/* 主题配色 */
body.purple {
  background: linear-gradient(120deg, #2d1b69, #4a1d96, #2d1b69);
  color: #fff;
}
body.purple button {
  background: rgba(192, 132, 252, 0.25);
  color: #f6e05e;
}
body.purple .option.selected {
  background: rgba(192, 132, 252, 0.35);
  border-left-color: #c084fc;
}

body.blue {
  background: linear-gradient(120deg, #0f172a, #1e293b, #334155);
  color: #fff;
}
body.blue button {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
}
body.blue .option.selected {
  background: rgba(56, 189, 248, 0.35);
  border-left-color: #38bdf8;
}

body.darkmagic {
  background: linear-gradient(120deg, #111827, #1e1b4b, #312e81);
  color: #f9fafb;
}
body.darkmagic button {
  background: rgba(217, 119, 6, 0.25);
  color: #fbbf24;
}
body.darkmagic .option.selected {
  background: rgba(217, 119, 6, 0.35);
  border-left-color: #fbbf24;
}

body.chinese {
  background: linear-gradient(120deg, #7f1d1d, #b91c1c, #ef4444);
  color: #fff;
}
body.chinese button {
  background: rgba(251, 191, 36, 0.2);
  color: #fff;
}
body.chinese .option.selected {
  background: rgba(251, 191, 36, 0.3);
  border-left-color: #fbbf24;
}

body.pink {
  background: linear-gradient(120deg, #fdf2f8, #fce7f3, #fbcfe8);
  color: #1f2937;
}
body.pink .container {
  background: rgba(255, 255, 255, 0.85);
}
body.pink button {
  background: rgba(249, 168, 212, 0.3);
  color: #be185d;
}
body.pink .option.selected {
  background: rgba(249, 168, 212, 0.4);
  border-left-color: #f472b6;
}

body.green {
  background: linear-gradient(120deg, #f0fdf4, #dcfce7, #bbf7d0);
  color: #1f2937;
}
body.green .container {
  background: rgba(255, 255, 255, 0.82);
}
body.green button {
  background: rgba(134, 239, 172, 0.25);
  color: #15803d;
}
body.green .option.selected {
  background: rgba(134, 239, 172, 0.35);
  border-left-color: #4ade80;
}

body.gold {
  background: linear-gradient(120deg, #4c1d95, #5b21b6, #6d28d9);
  color: #fff;
}
body.gold button {
  background: rgba(251, 191, 36, 0.22);
  color: #fbbf24;
}
body.gold .option.selected {
  background: rgba(251, 191, 36, 0.32);
  border-left-color: #fbbf24;
}

body.ocean {
  background: linear-gradient(120deg, #0c4a6e, #075985, #0369a1);
  color: #fff;
}
body.ocean button {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}
body.ocean .option.selected {
  background: rgba(56, 189, 248, 0.35);
  border-left-color: #38bdf8;
}

.btn-purple:hover { background: rgba(192, 132, 252, 0.5) !important; }
.btn-blue:hover { background: rgba(56, 189, 248, 0.5) !important; }
.btn-darkmagic:hover { background: rgba(217, 119, 6, 0.5) !important; }
.btn-chinese:hover { background: rgba(251, 191, 36, 0.5) !important; }
.btn-pink:hover { background: rgba(249, 168, 212, 0.5) !important; }
.btn-green:hover { background: rgba(134, 239, 172, 0.5) !important; }
.btn-gold:hover { background: rgba(251, 191, 36, 0.5) !important; }
.btn-ocean:hover { background: rgba(56, 189, 248, 0.5) !important; }

@media (max-width: 480px) {
  .container { padding: 20px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  button, .option { font-size: 15px; padding: 12px 16px; }
}