/* 引入本地字体 */
@font-face {
  font-family: "Ma Shan Zheng";
  src: url("../fonts/MaShanZheng-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/NotoSerifSC-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/NotoSerifSC-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/NotoSerifSC-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

/* 基础样式重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Serif SC", serif;
  min-height: 100vh;
  position: relative;
  /* 将背景图片改为body的CSS背景，而非img标签 */
  background-image: url("../images/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.title-font {
  font-family: "Ma Shan Zheng", cursive;
}

/* 玻璃卡片样式 */
.glass-card {
  background: linear-gradient(135deg, rgba(20, 10, 30, 0.75) 0%, rgba(40, 20, 50, 0.65) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 215, 100, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 215, 100, 0.2);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 350px;
}

@media (min-width: 640px) {
  .glass-card {
    padding: 32px;
    max-width: 400px;
  }
}

/* 输入框样式 */
.input-style {
  background: rgba(10, 5, 20, 0.6);
  border: 1px solid rgba(255, 215, 100, 0.25);
  transition: all 0.3s ease;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #fef3c7;
}

.input-style::placeholder {
  color: rgba(254, 243, 199, 0.4);
}

.input-style:focus {
  border-color: rgba(255, 200, 100, 0.6);
  box-shadow: 0 0 20px rgba(255, 180, 80, 0.2);
  outline: none;
}

/* 提交按钮 */
.submit-btn {
  background: linear-gradient(135deg, #8b4513 0%, #cd853f 50%, #8b4513 100%);
  border: 1px solid rgba(255, 215, 100, 0.5);
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  color: #fef3c7;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #a0522d 0%, #deb887 50%, #a0522d 100%);
  box-shadow: 0 0 30px rgba(255, 180, 80, 0.4);
  transform: translateY(-2px);
}

/* 装饰线 */
.decorative-line {
  background: linear-gradient(90deg, transparent, rgba(255, 215, 100, 0.6), transparent);
  height: 1px;
}

/* 弹窗样式 */
.modal-overlay {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: linear-gradient(135deg, rgba(20, 10, 30, 0.95) 0%, rgba(40, 20, 50, 0.9) 100%);
  border: 1px solid rgba(255, 215, 100, 0.4);
  box-shadow: 0 0 40px rgba(255, 180, 80, 0.3);
  border-radius: 12px;
  padding: 24px;
  max-width: 300px;
  text-align: center;
}

@media (min-width: 640px) {
  .modal-box {
    padding: 32px;
  }
}

/* 简化遮罩层样式，移除原bg-container相关样式 */
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(88, 28, 135, 0.3), transparent, rgba(49, 46, 129, 0.4));
  z-index: 1;
  pointer-events: none; /* 允许点击穿透 */
}

/* 主体内容 */
.main-content {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* 装饰容器 */
.decoration-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.decoration-star {
  color: rgba(251, 191, 36, 0.8);
  font-size: 18px;
}

.decoration-diamond {
  color: rgba(252, 211, 77, 0.6);
  font-size: 14px;
}

.decoration-line {
  width: 48px;
  margin: 0 8px;
}

/* 标题样式 */
.main-title {
  font-size: 24px;
  text-align: center;
  color: #fef3c7;
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}

@media (min-width: 640px) {
  .main-title {
    font-size: 30px;
  }
}

.sub-title {
  text-align: center;
  color: rgba(254, 243, 199, 0.6);
  font-size: 12px;
  margin-bottom: 20px;
}

/* 表单样式 */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: block;
  color: rgba(254, 243, 199, 0.9);
  font-size: 12px;
  font-weight: 500;
}

@media (min-width: 640px) {
  .form-label {
    font-size: 14px;
  }
}

.form-label span {
  margin-right: 4px;
}

textarea.input-style {
  resize: none;
}

.submit-container {
  padding-top: 8px;
}

/* 底部装饰 */
.footer-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.footer-line {
  width: 64px;
}

.footer-text {
  color: rgba(251, 191, 36, 0.6);
  font-size: 12px;
  margin: 0 12px;
}

/* 弹窗内容样式 */
.modal-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 20px;
  color: #fef3c7;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .modal-title {
    font-size: 24px;
  }
}

.modal-message {
  color: rgba(254, 243, 199, 0.8);
  font-size: 14px;
  margin-bottom: 8px;
}

.countdown-text {
  color: #fcd34d;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.warning-text {
  color: rgba(248, 113, 113, 0.9);
  font-size: 12px;
  margin-bottom: 20px;
}

.modal-btn {
  padding: 8px 24px;
  font-size: 14px;
}

.hidden {
  display: none !important;
}
