@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

:root {
  --brand-purple: #A878FF;
  --brand-orange: #FF9933;
  --accent-yellow: #FFDD33;
  --accent-blue: #33CCFF;
  --accent-mint: #33FFAA;
  --accent-pink: #FF6699;

  --white: #FFFFFF;
  --gray-1: #F5F7FA;
  --gray-2: #E4E6EB;
  --text-secondary: #606770;
  --text-primary: #1C1E21;

  --shadow-soft: 0 10px 30px rgba(168, 120, 255, 0.10);
  --shadow-card: 0 8px 24px rgba(28, 30, 33, 0.08);
  --shadow-hover: 0 12px 32px rgba(168, 120, 255, 0.18);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.58);
  --glass-blur: blur(18px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #fdf8ff 48%, #fffaf2 100%);
  color: var(--text-primary);
}

body {
  position: relative;
  overflow-x: hidden;
}

.wave-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(168, 120, 255, 0.18), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(51, 204, 255, 0.14), transparent 22%),
    radial-gradient(circle at 70% 78%, rgba(255, 153, 51, 0.14), transparent 24%),
    radial-gradient(circle at 20% 80%, rgba(255, 102, 153, 0.10), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #f8f7ff 50%, #fffaf5 100%);
}

.wave-bg::before,
.wave-bg::after {
  content: "";
  position: absolute;
  left: -10%;
  width: 120%;
  height: 260px;
  border-radius: 40% 60% 60% 40%;
  opacity: 0.45;
  filter: blur(12px);
  animation: waveMove 14s ease-in-out infinite alternate;
}

.wave-bg::before {
  bottom: 80px;
  background: linear-gradient(
    90deg,
    rgba(168, 120, 255, 0.22),
    rgba(51, 204, 255, 0.16),
    rgba(255, 153, 51, 0.18)
  );
}

.wave-bg::after {
  bottom: -20px;
  background: linear-gradient(
    90deg,
    rgba(255, 221, 51, 0.16),
    rgba(168, 120, 255, 0.16),
    rgba(255, 102, 153, 0.14)
  );
  animation-duration: 18s;
}

@keyframes waveMove {
  0% {
    transform: translateX(-2%) translateY(0) rotate(-2deg);
  }
  100% {
    transform: translateX(2%) translateY(-12px) rotate(2deg);
  }
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 20px 24px;
  margin-bottom: 22px;
}

.brand-title {
  margin: 0;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  line-height: 1.15;
}

.brand-title .cn {
  color: var(--brand-purple);
}

.handwrite-title {
  font-family: "Ma Shan Zheng", "PingFang SC", "Microsoft YaHei", cursive, sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
}

.handwrite-title .cn {
  color: var(--brand-purple);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-yellow);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 221, 51, 0.35);
}

.poll-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.poll-entry {
  position: relative;
  display: block;
  padding: 18px 20px;
  min-height: 96px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(228, 230, 235, 0.85);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  transition: all 0.22s ease;
}

.poll-entry:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.poll-entry::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, var(--brand-purple), var(--brand-orange));
}

.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.entry-tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(168, 120, 255, 0.10);
  color: var(--brand-purple);
}

.entry-arrow {
  font-size: 24px;
  font-weight: 900;
  color: var(--brand-orange);
}

.entry-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
}

.poll-page-card {
  padding: 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--brand-purple);
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.poll-title {
  margin: 18px 0 8px;
  font-size: 34px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.poll-subtitle {
  margin: 0 0 24px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.vote-options {
  display: grid;
  gap: 14px;
}

.option-btn {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(228, 230, 235, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(28, 30, 33, 0.04);
  transition: all 0.2s ease;
}

.option-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 120, 255, 0.45);
  box-shadow: 0 12px 28px rgba(168, 120, 255, 0.14);
}

.option-btn .opt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-orange));
  color: #fff;
  font-size: 15px;
}

.top-nav-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-orange));
  border: none;
  box-shadow: 0 8px 20px rgba(168, 120, 255, 0.22);
  transition: all 0.2s ease;
}

.top-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(168, 120, 255, 0.32);
  filter: brightness(1.03);
}

.top-nav-btn:visited,
.top-nav-btn:active {
  color: #fff;
}

.msg {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

.msg.success {
  color: #1ea672;
}

.msg.error {
  color: #d94c6a;
}

.result-box {
  margin-top: 28px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(245, 247, 250, 0.86);
  border: 1px solid rgba(228, 230, 235, 0.95);
}

.result-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.result-total {
  margin: 0 0 18px;
  color: var(--text-secondary);
}

.result-row {
  margin-bottom: 16px;
}

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 15px;
}

.result-line .label {
  font-weight: 800;
}

.result-line .meta {
  color: var(--text-secondary);
  font-weight: 700;
}

.result-line .mine {
  margin-left: 6px;
  color: var(--brand-orange);
  font-weight: 900;
}

.bar-wrap {
  width: 100%;
  height: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(228, 230, 235, 0.8);
  border-radius: 999px;
}

.bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-purple), var(--brand-orange));
  transition: width 0.35s ease;
}

@media (max-width: 900px) {
  .brand-title {
    font-size: 48px;
  }

  .poll-title {
    font-size: 28px;
  }

  .entry-title {
    font-size: 21px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 18px;
  }

  .brand-header,
  .poll-page-card {
    padding: 18px;
  }

  .brand-title {
    font-size: 48px;
  }

  .poll-entry {
    min-height: 88px;
    padding: 16px 18px;
  }

  .entry-top {
    margin-bottom: 10px;
  }

  .entry-title {
    font-size: 19px;
  }

  .option-btn {
    padding: 16px;
    font-size: 16px;
  }

  .top-nav-btn {
    padding: 9px 14px;
    font-size: 14px;
  }
}
