html {
  width: 100%;
  background: #eee;
  min-height: 100vh; 
}

body {
  background: url(../images/background.jpg) 0 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* 关键属性 - 使背景固定 */
  margin: 0 auto;
  max-width: 750px;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  box-sizing: border-box;
  overflow: hidden; 
  min-height: 100vh; 
}


/* 遮罩层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 弹窗容器 */
.password-modal {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 400px;
  max-width: 90%;
  overflow: hidden;
  animation: fadeIn 0.3s ease-out;
  transform: translateY(0);
  transition: all 0.3s ease;
}

/* 弹窗标题 */
.modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #d31027 0%, #ea384d 100%);
  color: white;
  text-align: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* 弹窗内容 */
.modal-content {
  padding: 25px;
}

.password-description {
  margin-bottom: 20px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 输入框样式 */
.password-input-group {
  position: relative;
  margin-bottom: 20px;
}

.password-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  box-sizing: border-box;
  background-color: #f9f9f9;
}

.password-input:focus {
  outline: none;
  border-color: #ea384d;
  /* 改为红色 */
  box-shadow: 0 0 0 3px rgba(234, 56, 77, 0.2);
  /* 改为红色 */
  background-color: white;
}

.password-input::placeholder {
  color: #aaa;
}

/* 按钮样式 */
.button-group {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-submit {
  background: linear-gradient(135deg, #d31027 0%, #ea384d 100%);
  color: white;
}

.btn-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(234, 56, 77, 0.3);
  /* 改为红色 */
}


/* 错误提示 */
.error-message {
  color: #d31027;
  /* 改为深红色 */
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.error-message.on {
  display: block;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式调整 */
@media (max-width: 480px) {
  .password-modal {
    width: 90%;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* 入口容器 */
.entry-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 基础3列布局 */
  gap: 15px;
  max-width: 750px;
  margin: 40% auto 0;
  padding: 0 10px;
}

/* 第2行的第一个模块（总第4个） */
.entry-item:nth-child(4) {
  grid-column: span 2;
}

/* 第4行的第一个模块（总第10个） */
.entry-item:nth-child(9) {
  grid-column: span 2;
}

/* 入口项 */
.entry-item {
  background: white;
  border-radius: 15px;
  padding: 15px 0;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

/* 为每个入口项设置不同的延迟动画 */
.entry-item:nth-child(1) {
  animation-delay: 0.1s;
}

.entry-item:nth-child(2) {
  animation-delay: 0.2s;
}

.entry-item:nth-child(3) {
  animation-delay: 0.3s;
}

.entry-item:nth-child(4) {
  animation-delay: 0.4s;
}

.entry-item:nth-child(5) {
  animation-delay: 0.5s;
}

.entry-item:nth-child(6) {
  animation-delay: 0.6s;
}

.entry-item:nth-child(7) {
  animation-delay: 0.7s;
}

.entry-item:nth-child(8) {
  animation-delay: 0.8s;
}

.entry-item:nth-child(9) {
  animation-delay: 0.9s;
}

.entry-item:nth-child(10) {
  animation-delay: 1.0s;
}

.entry-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 图标背景 */
.icon-bg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
}

/* 为每个图标设置不同的背景色 */
.entry-item:nth-child(1) .icon-bg {
  background: #FF6B6B;
}

.entry-item:nth-child(2) .icon-bg {
  background: #4ECDC4;
}

.entry-item:nth-child(3) .icon-bg {
  background: #45B7D1;
}

.entry-item:nth-child(4) .icon-bg {
  background: #FFA07A;
}

.entry-item:nth-child(5) .icon-bg {
  background: #98D8C8;
}

.entry-item:nth-child(6) .icon-bg {
  background: #F06292;
}

.entry-item:nth-child(7) .icon-bg {
  background: #7986CB;
}

.entry-item:nth-child(8) .icon-bg {
  background: #9575CD;
}

.entry-item:nth-child(9) .icon-bg {
  background: #64B5F6;
}

.entry-item:nth-child(10) .icon-bg {
  background: #4DB6AC;
}

.entry-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
}


/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  body {
    padding: 30px 15px;
  }
}

/* 红色主题容器 */
.news-container {
  margin: 40% auto 0;
}

/* 内容区域 */
.news-content {
  padding: 30px 25px;
  background: white;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

/* 图片样式 */
.news-image {
  width: 100%;
  border-radius: 8px;
  margin: 25px 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: block;
}

/* 段落样式 */
.news-paragraph {
  margin-bottom: 1.5em;
  font-size: 16px;
  color: #444;
  text-align: justify;
}

/* 强调段落 */
.highlight-paragraph {
  background-color: #fff5f5;
  border-left: 4px solid #d31027;
  padding: 15px 20px;
  margin: 25px 0;
  font-size: 16px;
  color: #555;
}

/* 图片说明文字 */
.image-caption {
  text-align: center;
  font-size: 14px;
  color: #777;
  margin-top: -15px;
  margin-bottom: 25px;
  padding: 0 10px;
}

/* 分隔线 */
.divider {
  border: none;
  height: 1px;
  background-color: #f0f0f0;
  margin: 30px 0;
}

/* 引用样式 */
.news-quote {
  font-style: italic;
  color: #666;
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-radius: 6px;
  margin: 25px 0;
  position: relative;
}

.news-quote::before {
  content: '"';
  font-size: 50px;
  color: #d31027;
  opacity: 0.2;
  position: absolute;
  left: 5px;
  top: -10px;
}

/* 列表样式 */
.news-list {
  margin: 20px 0 20px 25px;
}

.news-list li {
  margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 600px) {
  .news-content {
      padding: 20px 15px;
  }
  
  .news-paragraph, .highlight-paragraph {
      font-size: 15px;
  }
  
  .news-image {
      margin: 20px 0;
  }
}

.mes-container {
  margin: 40% auto 0;
}


/* 留言展示区 */
.messages-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  margin-bottom: 30px;
  max-height: 200px;
  overflow-y: scroll;
}

.message {
  padding: 15px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.message:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: bold;
  color: #d31027;
}

.message-content {
  color: #555;
}

/* 留言表单 */
.form-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.form-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #d31027;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #d31027;
  box-shadow: 0 0 0 2px rgba(211, 16, 39, 0.2);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.submit-btn {
  background-color: #d31027;
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
  font-weight: 500;
}

.submit-btn:hover {
  background-color: #b50e22;
}

