* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4e54c8;
  --secondary: #8f94fb;
  --accent: #ff5e62;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --dark: #2c3e50;
  --light: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  min-height: 100vh;
  padding: 20px;
  background-attachment: fixed;
  background-size: cover;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
}

.header .logo {
  height: 68px;
  width: auto;
  margin-right: 24px;
}

.header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #555;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.magic-box {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding-bottom: 24px;
  border-radius: 25px;
  text-align: center;
  margin: 24px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.magic-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: rotate(30deg);
}

.magic-box h2 {
  font-size: 2.2rem;
  margin-top: 24px;
  position: relative;
  z-index: 2;
}

.magic-box p {
  font-size: 1.3rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.name-wall {
  background: var(--card-bg);
  border-radius: 25px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.name-wall::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #ff8b94);
}

.name-wall h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--accent);
  font-size: 2rem;
}

.input-group {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  justify-content: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#nameInput {
  flex: 1;
  padding: 15px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  font-size: 1.2rem;
  outline: none;
  transition: all 0.3s;
}

#nameInput:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(78, 84, 200, 0.2);
}

#addBtn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 0 30px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

#addBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(78, 84, 200, 0.3);
}

.fas.fa-dice-one,
.fas.fa-dice-two {
  margin-top: 5px;
}

.draw-buttons {
  display: flex;
  gap: 25px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.draw-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.draw-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(78, 84, 200, 0.4);
}

.draw-btn#drawOneBtn {
  background: linear-gradient(135deg, var(--accent), #ff8b94);
}

.draw-btn#drawTwoBtn {
  background: linear-gradient(135deg, var(--success), #27ae60);
}

.names-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.name-tag {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 15px 25px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.name-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border-color: var(--secondary);
}

.name-tag i {
  color: var(--accent);
}

#count-display {
  font-size: 1.2em;
  margin-top: 20px;
  transition: opacity 0.5s;
}

.updating {
  color: #888;
  font-style: italic;
}

footer {
  text-align: center;
  margin-top: 40px;
  color: #555;
  font-size: 1.1rem;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* 右侧操作按钮容器 */
.right-controls {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

/* 控制按钮样式 */
/* .control-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  width: 100px;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0.9;
}

.control-btn:hover {
  transform: translateX(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  opacity: 1;
}

.control-btn:active {
  transform: scale(0.95);
} */
.control-btn {
  width: 80px;
  height: 120px;
  background: radial-gradient(
    ellipse at top center,
    #ffd700 0%,
    /* 顶部高光 */ #ffc900 25%,
    /* 金黄过渡 */ #d4a017 50%,
    /* 核心金黄 */ #b8860b 70%,
    /* 深金过渡 */ #8b6914 100% /* 深褐色边缘 */
  );
  border: 2px solid #c19a6b;
  /* 修正：上部圆角小（尖），下部圆角大（圆） */
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  position: fixed;
  top: 20px;
  right: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 -5px 15px rgba(139, 105, 20, 0.7),
    inset 0 6px 10px rgba(255, 255, 255, 0.6);
  font-weight: bold;
  color: #8b6914;
  text-shadow: 0 0.5px 1px rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow: hidden;
  writing-mode: vertical-lr;
  text-orientation: upright;
  line-height: 40px;
  text-align: center;
  font-size: 16px;
  color: #fff;
}

/* 高光位置微调：顶部高光更集中，底部高光更自然 */
.control-btn::before {
  content: "";
  position: absolute;
  top: 10px; /* 上移2px，贴合尖端 */
  left: 25px;
  width: 35px;
  height: 12px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 50%;
  transform: rotate(10deg);
  filter: blur(0.8px);
}

.control-btn::after {
  content: "";
  position: absolute;
  bottom: 15px;
  right: 10px;
  width: 15px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: rotate(-5deg);
  filter: blur(0.3px);
}

.control-btn:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3),
    inset 0 -5px 15px rgba(139, 105, 20, 0.7),
    inset 0 6px 10px rgba(255, 255, 255, 0.6);
}

.control-btn:active {
  transform: scale(0.97);
}

/* 各按钮特殊颜色 */
/* #easterEggBtn1 {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

#easterEggBtn2 {
  background: linear-gradient(135deg, #1dd1a1 0%, #10ac84 100%);
}

#easterEggBtn3 {
  background: linear-gradient(135deg, #f368e0 0%, #e056fd 100%);
} */

/* iframe 容器样式 */
.iframe-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
  height: 400px;
  width: 540px;
  overflow: hidden;
}

.iframe-container.show {
  display: block;
}

/* 遮罩层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.overlay.show {
  display: block;
}
