/* ===== 基础设置 ===== */
body {
  margin: 0;
  font-family: "Nunito", "微软雅黑", sans-serif;
  background: linear-gradient(180deg, #ffeaf5 0%, #fffafc 100%);
  color: #333;
  overflow-x: hidden;
  transition: background 0.5s, color 0.5s;
}

/* ===== 顶部固定信息 ===== */
.top-info {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 14px;
  color: #555;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.top-left {
  font-weight: bold;
  color: #ff7fbf;
}

.top-right {
  position: relative;
  color: #ff8fc0;
  cursor: pointer;
  transition: 0.3s;
}
.top-right:hover::after {
  content: "点击复制QQ号";
  position: absolute;
  top: 25px;
  right: 0;
  background: #fff;
  color: #555;
  font-size: 12px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 4px 8px;
  white-space: nowrap;
}
.top-right:hover {
  color: #ff4fa8;
  transform: scale(1.05);
}

/* ===== 导航栏 ===== */
.navbar {
  margin-top: 40px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(255,192,203,0.3);
  position: sticky;
  top: 40px;
  z-index: 900;
}
.navbar .logo {
  font-size: 20px;
  font-weight: bold;
  color: #ff69b4;
}
.navbar ul {
  display: flex;
  list-style: none;
  gap: 20px;
}
.navbar a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: 0.3s;
}
.navbar a:hover {
  color: #ff69b4;
  text-shadow: 0 0 4px rgba(255,182,193,0.8);
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
  cursor: pointer;
  font-size: 20px;
  transition: 0.3s;
}
.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

/* ===== 主视觉区 ===== */
.hero {
  position: relative;
  height: 70vh;
  background: linear-gradient(180deg, #fff0f7 0%, #fffafc 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  transition: background 0.5s;
}
.hero-content h1 {
  font-size: 42px;
  color: #ff69b4;
  margin-bottom: 10px;
}
.hero-content p {
  font-size: 18px;
  color: #666;
}
.hero-btn {
  margin-top: 20px;
  padding: 10px 30px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #ffb6c1, #ff8fc0);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.hero-btn:hover {
  background: linear-gradient(90deg, #ff8fc0, #ff69b4);
  transform: scale(1.05);
}

/* 樱花动画 */
.sakura::before, .sakura::after {
  content: "🌸";
  position: absolute;
  font-size: 24px;
  animation: fall 6s linear infinite;
  opacity: 0.7;
}
.sakura::after {
  left: 70%;
  animation-delay: 3s;
}
@keyframes fall {
  0% { top: -10%; transform: rotate(0deg); }
  100% { top: 100%; transform: rotate(360deg); }
}

/* ===== 内容区 ===== */
.content {
  max-width: 800px;
  margin: 60px auto;
  padding: 20px;
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255,182,193,0.3);
  backdrop-filter: blur(8px);
  transition: background 0.5s, color 0.5s;
}
.content h2 {
  color: #ff69b4;
  text-align: center;
}
.content p {
  line-height: 1.8;
  text-align: center;
  color: #555;
}

/* ===== 回音壁 ===== */
.echo-section {
  max-width: 800px;
  margin: 60px auto;
  padding: 20px;
  text-align: center;
}
.echo-section h2 {
  color: #ff69b4;
}
.echo-wall {
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(255,182,193,0.3);
  transition: background 0.5s;
}

.nickname-input, .message-input {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
input, button {
  border: none;
  outline: none;
}
input {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(255,105,180,0.2);
  font-size: 14px;
}
button {
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffb6c1, #ff8fc0);
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}
button:hover {
  background: linear-gradient(90deg, #ff8fc0, #ff69b4);
  transform: scale(1.05);
}
.messages {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
}
.message {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
}
.nickname {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}
.bubble {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  background: #ffeff7;
  color: #333;
  max-width: 80%;
  box-shadow: 0 2px 6px rgba(255,182,193,0.2);
  animation: pop 0.2s ease;
}
.message.me .bubble {
  background: #e0f7ff;
  align-self: flex-end;
}
@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 80px;
  text-align: center;
  font-size: 14px;
  color: #888;
  padding-bottom: 30px;
  transition: color 0.5s;
}

/* ===== 夜间模式样式 ===== */
body.dark {
  background: linear-gradient(180deg, #1e1e2e 0%, #2a2038 100%);
  color: #e8e8f8;
}

body.dark .navbar {
  background: rgba(50, 40, 70, 0.6);
  box-shadow: 0 2px 6px rgba(200,150,255,0.2);
}
body.dark .hero {
  background: linear-gradient(180deg, #2e1f3e 0%, #1b1424 100%);
}
body.dark .content,
body.dark .echo-wall {
  background: rgba(60,50,80,0.5);
  color: #e8e8f8;
}
body.dark .footer {
  color: #bbb;
}
body.dark input {
  background: #3b304b;
  color: #fff;
}
body.dark .bubble {
  background: #46385a;
  color: #fff;
}
body.dark .message.me .bubble {
  background: #4b6a9a;
}
body.dark .hero-content h1 {
  color: #e2aaff;
}
body.dark .content h2,
body.dark .echo-section h2 {
  color: #d59cff;
}
