/* ========= BASIC.CSS - 全局基础样式（精简版） ========= */
/* 兼容性：Android 9.0+ / iOS 12+ / Chrome 70+ / Safari 12+ / 微信浏览器 */

:root {
  --industrial-primary: #5a9c20;
  --industrial-secondary: #4a7c1a;
  --industrial-accent: #5a9c20;
  --industrial-dark: #1a2530;
  --industrial-light: #f0f7e6;
  --industrial-border: #4a7c1a;
  --industrial-text: #2c3e50;
  --industrial-text-light: #ffffff;
  --industrial-highlight: #4a7c1a;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --mid-gray: #666666;
  --dark-gray: #333333;
  --border-color: #5a9c20;
  --main-max-width: 1200px;
}

/* 离线提示样式 - 简化 */
.offline-indicator {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #ff9900;
    color: white;
    text-align: center;
    padding: 12px 15px;
    font-size: 20px;
    font-weight: bold;
    z-index: 9999;
    display: none;
}

.offline-indicator.show {
    display: block;
}

.offline-indicator.online {
    background: #5a9c20;
}

/* 全局重置与盒子模型 */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, h1, h2, h3, h4, p, ul, ol, form, fieldset, figure {
  margin: 0;
  padding: 0;
}

/* 全局基础样式 */
body {
  background-color: var(--white);
  font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", "SimHei", "\5B8B\4F53", simsun, sans-serif;
  color: var(--industrial-text);
  line-height: 1.6;
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  position: relative;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--industrial-accent);
  -webkit-tap-highlight-color: rgba(90, 156, 32, 0.1);
}

a:hover {
  color: var(--industrial-highlight);
}

/* 通用工具类 */
.none {
  display: none;
}

.clearfix:after {
  content: "";
  display: block;
  clear: both;
  height: 0;
  visibility: hidden;
}

/* 底部版权信息 */
#david_footer {
  color: #284116;
  padding: 5px 0 !important;
  text-align: center;
  border-top: 1px solid #5a9c20;
  margin: 0 !important;
  height: auto !important;
  min-height: 28px !important;
  line-height: 1.4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 10 !important;

}

#david_footer .bottom {
  color: #284116;
  font-size: 15px !important;
  font-weight: normal;
  max-width: var(--main-max-width);
  margin: 0 auto !important;
  padding: 4px 10px !important;
  line-height: 1.4 !important;
  height: auto !important;
  display: block !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  /* 大屏幕设备保持原字体大小 */
}

@media (max-width: 992px) {
  body {
    font-size: 17px;
  }
  
  #david_footer .bottom {
    font-size: 14px !important;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  #david_footer {
    min-height: 24px !important;
    padding: 4px 0 !important;
  }
  
  #david_footer .bottom {
    font-size: 13px !important;
    line-height: 1.3 !important;
    padding: 3px 8px !important;
  }
  
  .offline-indicator {
    top: 50px;
    padding: 10px 12px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  
  #david_footer {
    min-height: 22px !important;
    padding: 3px 0 !important;
  }
  
  #david_footer .bottom {
    font-size: 13px !important;
    line-height: 1.3 !important;
    padding: 2px 6px !important;
  }
  
  .offline-indicator {
    top: 45px;
    padding: 8px 10px;
    font-size: 16px;
  }
}

@media (max-width: 320px) {
  body {
    font-size: 14px;
  }
  
  #david_footer {
    min-height: 20px !important;
  }
  
  #david_footer .bottom {
    font-size: 12px !important;
    padding: 2px 4px !important;
  }
  
  .offline-indicator {
    font-size: 15px;
    padding: 6px 8px;
  }
}

/* 移除所有动画和过渡 */
* {
    animation: none !important;
    transition: none !important;
}

/* 特大字体模式支持 */
@media (prefers-font-size: large) {
  body {
    font-size: 20px;
  }
  
  #david_footer {
    min-height: 30px !important;
    padding: 6px 0 !important;
  }
  
  #david_footer .bottom {
    font-size: 16px !important;
    padding: 4px 12px !important;
  }
  
  .offline-indicator {
    font-size: 22px;
    padding: 14px 20px;
  }
}

@media (prefers-font-size: x-large) {
  body {
    font-size: 22px;
  }
  
  #david_footer {
    min-height: 32px !important;
    padding: 8px 0 !important;
  }
  
  #david_footer .bottom {
    font-size: 18px !important;
    padding: 6px 15px !important;
  }
  
  .offline-indicator {
    font-size: 24px;
    padding: 16px 24px;
  }
}

/* ========= 返回首页按钮通用样式 ========= */
.return-home-container {
    max-width: 800px;
    text-align: left;
    margin: 20px auto;
}

.return-home-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: #5a9c20;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    border-radius: 40px;
    border: 2px solid #4a7c1a;
    transition: background 0.2s ease;
    line-height: 1.2;
}

.return-home-btn:hover {
    background-color: #4a7c1a;
    color: white;
}

/* 响应式适配（与 basic.css 中的断点保持一致） */
@media (max-width: 768px) {
    .return-home-btn {
        padding: 8px 20px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .return-home-btn {
        padding: 6px 16px;
        font-size: 16px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .return-home-btn {
        border: 3px solid black;
        background-color: black;
        color: white;
    }
    .return-home-btn:hover {
        background-color: #333;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .return-home-btn {
        transition: none;
    }
}