:root {
  --color-primary: #C41E3A;
  --color-primary-dark: #9A1830;
  --color-gold: #D4A84B;
  --color-gold-light: #E8D5A3;
  --color-gold-dark: #B8943A;
  --color-dark: #1A1A1A;
  --color-bg: #F8F5F0;
  --color-white: #FFFFFF;
  --color-text: #333333;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-border: #E8D5A3;
  --color-success: #2E8B57;
  --color-warning: #F5A623;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --font-base: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

.container { width: 100%; padding: 0 16px; max-width: 768px; margin: 0 auto; }
@media (min-width: 576px) { .container { padding: 0 24px; } }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, rgba(26,18,18,0.85) 0%, rgba(26,18,18,0.6) 60%, transparent 100%);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background 0.3s;
}
.site-header.scrolled {
  background: rgba(26,18,18,0.95);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px; max-width: 768px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700;
}
.logo-text { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 1px; line-height: 1.2; }
.logo-text small { display: block; font-size: 10px; font-weight: 400; opacity: 0.8; letter-spacing: 0.5px; }
.menu-btn {
  width: 40px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span {
  display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s;
}
.menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Sidebar Nav */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1999;
  opacity: 0; visibility: hidden; transition: opacity 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 75%; max-width: 300px;
  background: linear-gradient(180deg, #1a1212 0%, #2a1a1a 100%); z-index: 2000;
  transform: translateX(-100%); transition: transform 0.3s ease; padding: 24px 0;
  display: flex; flex-direction: column;
}
.sidebar.active { transform: translateX(0); }
.sidebar-header {
  display: flex; align-items: center; gap: 10px; padding: 0 20px 20px;
  border-bottom: 1px solid rgba(212,168,75,0.2); margin-bottom: 12px;
}
.sidebar-header .logo-icon { width: 32px; height: 32px; font-size: 14px; }
.sidebar-header .logo-text { font-size: 14px; }
.sidebar-menu { flex: 1; overflow-y: auto; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  color: #fff; font-size: 15px; transition: all 0.2s; border-left: 3px solid transparent;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
  background: rgba(196,30,58,0.15); color: var(--color-gold); border-left-color: var(--color-gold);
}
.sidebar-menu li a svg { width: 20px; height: 20px; opacity: 0.7; flex-shrink: 0; }
.sidebar-menu li a:hover svg, .sidebar-menu li a.active svg { opacity: 1; }
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(212,168,75,0.2);
  font-size: 12px; color: var(--color-gold-light); opacity: 0.6; text-align: center;
}

/* Section Title */
.section-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.section-title h2 { font-size: 20px; font-weight: 700; color: var(--color-dark); }
.section-title .line {
  flex: 1; height: 1px; background: linear-gradient(90deg, var(--color-gold-light), transparent);
}
.section-title .more-link {
  font-size: 13px; color: var(--color-primary); display: flex; align-items: center; gap: 2px;
}

/* Card Base */
.card {
  background: var(--color-white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.card:active { transform: scale(0.98); }

/* Tag */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600;
}
.tag-red { background: rgba(196,30,58,0.1); color: var(--color-primary); }
.tag-gold { background: rgba(212,168,75,0.15); color: var(--color-gold-dark); }
.tag-green { background: rgba(46,139,87,0.1); color: var(--color-success); }
.tag-orange { background: rgba(245,166,35,0.1); color: var(--color-warning); }
.tag-gray { background: rgba(0,0,0,0.05); color: var(--color-text-muted); }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600;
  transition: all 0.2s; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: 0 4px 12px rgba(196,30,58,0.3); }
.btn-primary:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark)); color: #fff; box-shadow: 0 4px 12px rgba(212,168,75,0.3); }
.btn-outline { border: 1px solid var(--color-gold); color: var(--color-gold-dark); background: transparent; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.form-group label .required { color: var(--color-primary); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: var(--radius-md);
  font-size: 15px; background: var(--color-white); transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(212,168,75,0.15); }
.form-input.error, .form-select.error, .form-textarea.error { border-color: var(--color-primary); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-error { color: var(--color-primary); font-size: 12px; margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* Image Upload */
.upload-area {
  border: 2px dashed var(--color-gold-light); border-radius: var(--radius-md);
  padding: 24px; text-align: center; background: rgba(212,168,75,0.04); cursor: pointer; transition: all 0.2s;
}
.upload-area:active { background: rgba(212,168,75,0.08); }
.upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.upload-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); }

/* Footer */
.site-footer {
  background: var(--color-dark); color: rgba(255,255,255,0.6); padding: 32px 0 24px; margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.footer-col h4 { font-size: 14px; color: var(--color-gold); margin-bottom: 10px; font-weight: 600; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.5); padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--color-gold-light); }
.footer-bottom { text-align: center; font-size: 12px; color: rgba(255,255,255,0.3); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; }
.footer-contact { font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.footer-contact p { display: flex; align-items: center; gap: 6px; }
.footer-contact svg { width: 16px; height: 16px; opacity: 0.5; }

/* Back to Top */
.back-to-top {
  position: fixed; right: 16px; bottom: 24px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(20px); transition: all 0.3s; pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Toast */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(26,18,18,0.9); color: #fff; padding: 12px 24px; border-radius: var(--radius-md);
  font-size: 14px; z-index: 3000; opacity: 0; transition: all 0.3s; pointer-events: none;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-primary); }

/* Loading */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,0.8); z-index: 2500;
  display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.loading-overlay.active { opacity: 1; visibility: visible; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--color-gold-light); border-top-color: var(--color-primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Page padding for fixed header */
.page-content { padding-top: 56px; }
