/* ===== gacam67 Shared CSS (Header + Footer) ===== */
:root {
  --primary: #2F6BFF;
  --secondary: #6FA3FF;
  --btn-bg: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --page-bg: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow: #A5C4FF;
  --header-offset: 122px;
}

* { box-sizing: border-box; }

body {
  padding-top: var(--header-offset);
  margin: 0;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(47, 107, 255, 0.20), 0 2px 6px rgba(0, 0, 0, 0.08);
  background-color: #FFFFFF;
}

.header-top {
  box-sizing: border-box;
  width: 100%;
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F7FB 100%);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 24px;
  padding-right: 24px;
  gap: 12px;
}

.logo {
  display: inline-block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--primary);
  line-height: 1;
  white-space: nowrap;
}
.logo:hover { color: var(--secondary); }
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-login {
  background: #FFFFFF;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-login:hover { background: #EEF4FF; }
.btn-register {
  background: var(--btn-bg);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(47, 107, 255, 0.40);
}
.btn-register:hover { filter: brightness(1.06); }

/* Mobile buttons hidden by default on desktop */
.mobile-nav-buttons {
  display: none;
  box-sizing: border-box;
  min-height: 48px;
}

/* Main nav (desktop default) */
.main-nav {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(90deg, #2F6BFF 0%, #4A8BFF 100%);
}

.nav-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
}
.nav-menu li { margin: 0; }
.nav-menu a {
  display: block;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.20);
  color: #FFFFFF;
}

.hamburger-menu { display: none; }
.mobile-menu-overlay { display: none; }

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(180deg, #1B2A44 0%, #141F33 100%);
  color: #E6EEFF;
  font-family: inherit;
  margin-top: 40px;
}
.footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
.footer-top-row {
  padding: 18px 0 6px;
  border-bottom: 1px solid rgba(111, 163, 255, 0.20);
}
.footer-top-grid { padding: 36px 0 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}
.footer-col { min-width: 0; }
.footer-about .footer-logo {
  display: inline-block;
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.footer-about .footer-logo:hover { color: var(--secondary); }
.footer-description {
  font-size: 14px;
  line-height: 1.7;
  color: #C3D3F0;
  margin: 0 0 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.footer-col-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary);
  display: inline-block;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li { margin-bottom: 10px; }
.footer-nav a {
  color: #C3D3F0;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}
.footer-nav a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}
.footer-slot-anchor-inner { width: 100%; }
.footer-dynamic-col {
  display: flex;
  flex-direction: column;
  min-height: 20px;
}
.footer-mid {
  padding: 16px 0;
  border-top: 1px solid rgba(111, 163, 255, 0.20);
}
.footer-mid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}
.footer-mid-item { flex: 1 1 200px; min-width: 0; }
.footer-mid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.footer-mid-cell { min-width: 0; }
.footer-bottom-slot { padding: 10px 0; }
.footer-bottom {
  padding: 18px 0 22px;
  border-top: 1px solid rgba(111, 163, 255, 0.20);
  text-align: center;
}
.footer-copyright {
  margin: 0;
  font-size: 13px;
  color: #A9BCDC;
  line-height: 1.6;
}

/* ===== RESPONSIVE (Mobile) ===== */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }

  .header-top {
    height: 60px !important;
    min-height: 60px !important;
  }
  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 22px;
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 56px;
  }
  .desktop-nav-buttons { display: none !important; }

  .mobile-nav-buttons {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    min-height: 48px;
    background: #F4F7FB;
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1002;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    background: #EEF4FF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
  }
  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-nav {
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 82%;
    max-width: 320px;
    height: calc(100vh - var(--header-offset));
    min-height: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    background: linear-gradient(180deg, #2F6BFF 0%, #1B4FD6 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  }
  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-container {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 16px 15px 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .nav-menu {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-menu a {
    display: block;
    width: 100%;
    padding: 13px 14px;
    font-size: 15px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 25, 45, 0.55);
    z-index: 1000;
  }
  .mobile-menu-overlay.active { display: block; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .footer-mid-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { padding-left: 15px; padding-right: 15px; }
  .footer-col-title { font-size: 15px; }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
