/* AI汇记 - 公共样式 v1.0 */
/* 统一头部、底部、配色，SSR 和 SPA 共用 */

:root {
  --brand: #409eff;
  --brand-dark: #337ecc;
  --brand-light: #ecf5ff;
  --bg: #f5f7fa;
  --text: #303133;
  --text-secondary: #606266;
  --text-light: #909399;
  --border: #ebeef5;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }

/* === 统一头部 === */
.site-header { height: 60px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 200; }
.site-header-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 100%; padding: 0 24px; }
.site-logo { font-size: 19px; font-weight: 700; color: #409eff; display: flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.logo-icon { font-size: 22px; }
.logo-text { letter-spacing: 0.5px; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 36px; padding: 0 14px; font-size: 15px; color: #606266; text-decoration: none; border-radius: 8px; transition: all 0.2s ease; white-space: nowrap; }
.nav-link:hover { color: #409eff; background: #ecf5ff; }
.nav-link.active { color: #409eff; font-weight: 500; background: #ecf5ff; }
.nav-btn-login { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 36px; padding: 0 10px; margin-left: 4px; font-size: 15px; font-weight: 500; color: #fff; background: linear-gradient(135deg, #409eff, #5b8def); border-radius: 8px; text-decoration: none; transition: all 0.2s ease; white-space: nowrap; box-shadow: 0 2px 8px rgba(64,158,255,0.3); }
.nav-btn-login:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(64,158,255,0.4); }
.nav-btn-console { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 36px; padding: 0 10px; margin-left: 4px; font-size: 15px; font-weight: 500; color: #fff; background: linear-gradient(135deg, #67c23a, #85ce61); border-radius: 8px; text-decoration: none; transition: all 0.2s ease; white-space: nowrap; box-shadow: 0 2px 8px rgba(103,194,58,0.3); }
.nav-btn-console:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(103,194,58,0.4); }
/* 注册按钮（次要操作） */
.nav-btn-register { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 36px; padding: 0 10px; margin-left: 4px; font-size: 15px; font-weight: 500; color: #409eff; background: #fff; border: 1px solid #409eff; border-radius: 8px; text-decoration: none; transition: all 0.2s ease; white-space: nowrap; }
.nav-btn-register:hover { background: #ecf5ff; }

.hamburger-btn { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 0; border-radius: 8px; transition: background 0.2s; }
.hamburger-btn:hover { background: #f5f7fa; }
.hamburger-btn span { display: block; width: 22px; height: 2px; background: #303133; border-radius: 2px; margin: 0 auto; transition: all 0.3s ease; }
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 299; }

.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0; }
.drawer-title { font-size: 18px; font-weight: 700; color: #409eff; }
.drawer-close { background: none; border: none; font-size: 20px; color: #909399; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.drawer-close:hover { background: #f5f7fa; color: #303133; }
.drawer-nav { flex: 1; padding: 8px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.drawer-link { display: flex; align-items: center; padding: 12px 20px; font-size: 15px; color: #303133; text-decoration: none; transition: all 0.2s; border-left: 3px solid transparent; }
.drawer-link:hover { background: #ecf5ff; color: #409eff; border-left-color: #409eff; }
.drawer-footer { padding: 12px 16px 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.drawer-btn-login { display: flex; align-items: center; justify-content: center; height: 40px; font-size: 15px; font-weight: 500; color: #fff; background: linear-gradient(135deg, #409eff, #5b8def); border-radius: 8px; text-decoration: none; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(64,158,255,0.3); }
.drawer-btn-register {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  color: #409eff;
  background: #fff;
  border: 1px solid #409eff;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.drawer-btn-login:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(64,158,255,0.4); }
.drawer-btn-console { display: flex; align-items: center; justify-content: center; height: 40px; font-size: 15px; font-weight: 500; color: #fff; background: linear-gradient(135deg, #67c23a, #85ce61); border-radius: 8px; text-decoration: none; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(103,194,58,0.3); }
.drawer-btn-console:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(103,194,58,0.4); }

/* === 统一底部 === */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 32px 20px 20px;
  margin-top: 40px;
}
.site-footer-inner {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.footer-contact {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-contact .phone {
  font-weight: 600;
  color: var(--brand);
  font-size: 16px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--brand); }
.footer-copyright {
  font-size: 12px;
  color: #c0c4cc;
}

/* === 响应式 === */
@media (max-width: 1024px) { .site-header-inner { padding: 0 16px; } .nav-link { min-width: 48px; padding: 0 10px; font-size: 14px; } }
@media (max-width: 768px) { .pc-only { display: none !important; } .mobile-only { display: flex !important; } .site-header { height: 52px; } .site-header-inner { padding: 0 16px; } .site-logo { font-size: 17px; } .logo-icon { font-size: 20px; } .hamburger-btn { display: flex; } .footer-links { gap: 16px; } }


/* === 移动端导航 (SSR) === */
.mobile-only { display: none; }

@media (max-width: 768px) {
    .pc-only { display: none !important; }
    .mobile-only { display: flex !important; }
    .site-header { padding: 0 12px; }
    .hamburger-btn {
        flex-direction: column; justify-content: center; gap: 5px;
        width: 36px; height: 36px; background: none; border: none;
        cursor: pointer; padding: 0; border-radius: 8px;
    }
    .hamburger-btn span {
        display: block; width: 22px; height: 2px; background: #303133;
        border-radius: 2px; margin: 0 auto;
    }
    .mobile-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 299;
    }
    .mobile-drawer {
        position: fixed; top: 0; right: 0; width: 280px; max-width: 80vw;
        height: var(--app-vh, 100vh); background: #fff; z-index: 300;
        display: flex; flex-direction: column;
        box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    }
    .drawer-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
    }
    .drawer-title { font-size: 18px; font-weight: 700; color: #409eff; }
    .drawer-close {
        background: none; border: none; font-size: 20px; color: #909399;
        cursor: pointer; padding: 4px 8px; border-radius: 6px;
    }
    .drawer-nav { flex: 1; padding: 8px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .drawer-link {
        display: flex; align-items: center; padding: 12px 20px;
        font-size: 15px; color: #303133; text-decoration: none;
        border-left: 3px solid transparent;
    }
    .drawer-link:hover { background: #ecf5ff; color: #409eff; }
    .drawer-footer {
        padding: 12px 16px 56px; border-top: 1px solid #f0f0f0; flex-shrink: 0;
        display: flex; flex-direction: column; gap: 8px;
    }
    .drawer-btn-login {
        display: flex; align-items: center; justify-content: center;
        height: 40px; font-size: 15px; font-weight: 500; color: #fff;
        background: linear-gradient(135deg, #409eff, #5b8def);
        border-radius: 8px; text-decoration: none;
        box-shadow: 0 2px 6px rgba(64,158,255,0.3);
    }
    .drawer-btn-console {
        display: flex; align-items: center; justify-content: center;
        height: 40px; font-size: 15px; font-weight: 500; color: #fff;
        background: linear-gradient(135deg, #67c23a, #85ce61);
        border-radius: 8px; text-decoration: none;
        box-shadow: 0 2px 6px rgba(103,194,58,0.3);
    }
}


/* === 统一抽屉菜单样式 === */
.mobile-drawer {
  background: linear-gradient(180deg, #f0f7ff 0%, #e8f3ff 100%);
}
.drawer-header {
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(64, 158, 255, 0.15);
}
.drawer-close:hover {
  background: rgba(64, 158, 255, 0.1);
  color: #409eff;
}
.drawer-nav {
  padding: 12px 12px;
}
.drawer-link {
  border-radius: 8px;
  margin-bottom: 4px;
  padding: 12px 16px;
}
.drawer-link:hover {
  background: rgba(64, 158, 255, 0.1);
  color: #409eff;
  border-left-color: #409eff;
}
.drawer-link.active {
  background: rgba(64, 158, 255, 0.15);
  color: #409eff;
  font-weight: 600;
  border-left-color: #409eff;
}
