/*
  宅客基地二开优化版
  版本：1.0
  描述：基于原版代码进行界面优化、功能增强和性能提升
*/

/* 整合自index.html的样式 - 宅客基地优化版 */

/*
  宅客基地二开优化版
  版本：1.0
  描述：基于原版代码进行界面优化、功能增强和性能提升
*/

/* 全局样式和变量 */
:root {
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --highlight-blue: #3498db;
  --highlight-purple: #9b59b6;
  --highlight-pink: #e91e63;
  --highlight-text: #ffffff;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background-color: #0a0a0a;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* 背景效果 */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.05) 0%, transparent 20%),
              radial-gradient(circle at 80% 40%, rgba(155, 89, 182, 0.05) 0%, transparent 20%),
              radial-gradient(circle at 30% 80%, rgba(233, 30, 99, 0.05) 0%, transparent 20%);
}

.blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.circle1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--highlight-blue), var(--highlight-purple));
  top: -100px;
  right: -100px;
}

.circle2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--highlight-purple), var(--highlight-pink));
  bottom: -100px;
  left: -100px;
}

.circle3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--highlight-blue), var(--highlight-pink));
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
}

/* 玻璃效果基础样式 */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-color);
}

.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity: 0.5;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

/* 头部公告 */
.announcement-bar {
  width: 100%;
  padding: 10px 0;
  text-align: center;
  position: relative;
}

/* 导航栏 */
.main-nav {
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(45deg, var(--text-primary), var(--glass-highlight));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 主要内容 */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* 表单部分 */
.form-section {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-color);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
}

/* 使用说明框架 */
.instructions-frame {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-color);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
}

.instructions-frame h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
  text-align: center;
}

/* 分类框样式 */
.category-boxes {
  margin-bottom: 30px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  min-height: 150px;
}

.category-card i {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.category-card span {
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 16px;
}

.category-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* 微信服务卡片特殊样式 */
.wechat-service-card i {
  color: #07C160;
}

/* 页脚 */
.main-footer {
  margin-top: 50px;
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content p {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-content a {
  color: var(--highlight-blue);
  text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .form-section,
  .instructions-frame {
    padding: 20px 15px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .category-card {
    padding: 25px 15px;
    min-height: 120px;
  }
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin: 10% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
  color: var(--text-secondary);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--text-primary);
  text-decoration: none;
}

.modal h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.modal p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.modal-qrcode {
  max-width: 200px;
  margin: 0 auto 20px;
  border: 5px solid white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 修复weui样式冲突 */
.weui-cells {
  background-color: transparent !important;
  border: none !important;
}

.weui-cell {
  border-bottom: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.weui-input {
  color: var(--text-primary);
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 增强表单输入框样式，完全去除白色背景 */
#form .weui-cell {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

#form .weui-input {
  background-color: transparent !important;
  color: var(--text-primary);
  font-size: 16px;
}

/* 移除输入框容器的背景色 */
.weui-cells_form {
  background-color: transparent !important;
}

/* 表单标题白色高亮 */
.weui-cells__title {
  color: white !important;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* 提交按钮改为透明玻璃质感 */
.weui-btn,
.weui-btn_primary {
  background: rgba(52, 152, 219, 0.2) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white !important;
  transition: all 0.3s ease;
  margin-top: 20px !important;
}

/* 增加提交按钮容器的上边距 */
.weui-form__opr-area {
  margin-top: 20px !important;
}

.weui-btn:hover,
.weui-btn_primary:hover {
  background: rgba(52, 152, 219, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* 输入框聚焦效果 */
input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* 表单验证提示 */
.error-tip {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.error-tip.show {
  display: block;
}