/* ============================================================
   ky_mahjong · base.css
   全局变量 + 排版 + 通用组件
   ============================================================ */
:root {
  --kys-primary: #059669;
  --kys-primary-rgb: 5,150,105;
  --kys-accent: #ffc107;
  --kys-success: #198754;
  --kys-info: #0dcaf0;
  --kys-warning: #ffc107;
  --kys-danger: #dc3545;
  --kys-text: #212529;
  --kys-text-2: #6c757d;
  --kys-muted: #adb5bd;
  --kys-bg: #ffffff;
  --kys-bg-2: #f8f9fa;
  --kys-bg-3: #e9ecef;
  --kys-border: #dee2e6;
  --kys-dark: #1c1f3f;
  --kys-dark-2: #3d0b40;
  --kys-radius: 12px;
  --kys-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --kys-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--kys-text);
  background: var(--kys-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; color: var(--kys-text); }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: clamp(18px, 2.2vw, 24px); }

a { color: var(--kys-primary); text-decoration: none; transition: color .2s; }
a:hover { color: #0a58ca; }

.text-primary { color: var(--kys-primary) !important; }
.text-info { color: var(--kys-info) !important; }
.text-success { color: var(--kys-success) !important; }
.text-warning { color: var(--kys-warning) !important; }
.text-muted { color: var(--kys-text-2) !important; }
.text-white-50 { color: rgba(255,255,255,.5) !important; }

.bg-primary { background-color: var(--kys-primary) !important; }
.bg-success { background-color: var(--kys-success) !important; }
.bg-warning { background-color: var(--kys-warning) !important; }
.bg-info { background-color: var(--kys-info) !important; }
.bg-light { background-color: var(--kys-bg-2) !important; }

.container { max-width: 1180px; padding-left: 20px; padding-right: 20px; }

/* 按钮 */
.btn-primary { background: var(--kys-primary); border-color: var(--kys-primary); }
.btn-primary:hover { background: #0a58ca; border-color: #0a58ca; }
.btn-warning { background: var(--kys-warning); border-color: var(--kys-warning); color: #212529 !important; }
.btn-glass {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,.25); color: #fff; }

/* 图标圆饼 */
.kys-icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.kys-icon-circle.sm { width: 48px; height: 48px; }

/* 通用 Section 头 */
.kys-sec-head { text-align: center; margin-bottom: 48px; }
.kys-sec-head h2 { margin-bottom: 12px; }
.kys-sec-head p { color: var(--kys-text-2); margin: 0 auto; max-width: 640px; }

/* 响应式元素 */
img, svg, video, iframe { max-width: 100%; height: auto; }
table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 输入框（防 iOS 缩放） */
input, textarea, select { font-size: 16px; }

/* MOBILE ENHANCED - base */
@media (max-width: 991.98px) {
  html, body { font-size: 15px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}
@media (max-width: 768px) {
  html, body { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  .btn { min-height: 44px; }
  .py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .py-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}
@media (max-width: 480px) {
  html, body { font-size: 15px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .btn { padding: 10px 14px; font-size: 14px; }
}
