* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; background: #f5f7fa; color: #303133; line-height: 1.6; }

/* 页面内容最大宽度变量，默认占满视口；移动端由各自的 @media padding 自适应 */
:root {
    --content-max-width: 100%;
}

/* 让受 max-width 约束的容器把 padding 算进总宽度，避免移动端溢出 */
.main, .hero-content, .profile-content { box-sizing: border-box; }

/* 移动端抽屉菜单通用样式 */
.mobile-menu-btn { display: none; color: #fff; }
.mobile-menu-btn .el-icon { font-size: 20px; }

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 20px;
    height: 64px;
    box-sizing: border-box;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo span { background: linear-gradient(90deg, #00d4ff, #7b61ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.header .nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.header .nav a { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, 0.8); text-decoration: none; white-space: nowrap; }
.header .nav a:hover { color: #fff; }
.header .nav a .el-icon { font-size: 14px; color: currentColor; }

.mobile-menu-drawer .el-drawer__body { padding: 0; overflow-x: hidden; }
.mobile-menu { display: flex; flex-direction: column; height: 100%; padding: 0; box-sizing: border-box; width: 100%; overflow-x: hidden; }
.mobile-menu-drawer .el-drawer { width: min(85vw, 360px) !important; }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #f0f0f0; }
.mobile-menu-header .logo { display: flex; align-items: center; gap: 8px; color: #303133; font-size: 18px; }
.mobile-menu-header .logo span { color: inherit; }
.mobile-menu-header .el-button { color: #909399; }

.mobile-menu-nav { display: flex; flex-direction: column; padding: 12px 16px; }
.mobile-menu-nav a { display: flex; align-items: center; gap: 12px; color: #303133; text-decoration: none; font-size: 16px; padding: 14px 8px; border-bottom: 1px solid #f0f0f0; transition: color .2s, background .2s; border-radius: 8px; }
.mobile-menu-nav a:last-child { border-bottom: none; }
.mobile-menu-nav a:hover, .mobile-menu-nav a.active { color: #409eff; background: rgba(64, 158, 255, 0.08); }
.mobile-menu-nav a .el-icon { font-size: 18px; color: #909399; flex-shrink: 0; }
.mobile-menu-nav a:hover .el-icon, .mobile-menu-nav a.active .el-icon { color: #409eff; }

.mobile-menu-divider { height: 1px; background: #f0f0f0; margin: 0 16px; }

.mobile-menu-footer { margin-top: auto; padding: 16px; }
.mobile-menu-bot { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border-radius: 10px; background: linear-gradient(135deg, #00d4ff, #7b61ff); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25); }
.mobile-menu-bot .el-icon { font-size: 18px; }

.header .nav a.active { color: #fff; }

.lang-select .el-input__wrapper { background: rgba(255, 255, 255, 0.1) !important; box-shadow: none !important; border-radius: 20px; }
.lang-select .el-input__inner { color: #fff; }

.footer { text-align: center; padding: 40px 20px; color: #909399; font-size: 13px; }
.footer a { color: #606266; text-decoration: none; }
.footer a:hover { color: #409eff; }

[v-cloak] { display: none !important; }
.page-loader { display: none; position: fixed; inset: 0; background: #f5f7fa; align-items: center; justify-content: center; z-index: 9999; font-size: 16px; color: #606266; }
#app[v-cloak] + .page-loader { display: flex; }

@media (max-width: 860px) {
    .header .nav { display: none; }
    .header { padding: 0 16px; height: auto; min-height: 56px; }
    .mobile-menu-btn { display: inline-flex; }
}

@media (max-width: 480px) {
    .header { padding: 0 12px; gap: 8px; }
    .header .logo { font-size: 14px; gap: 6px; }
    .header .el-select { width: 90px !important; }
}

/* 暗色模式：仅保留自定义页面/布局补色，Element Plus 组件交给官方 dark/css-vars.css */
html.dark {
    color-scheme: dark;
}

html.dark body {
    background: #0d1117;
    color: #e0e0e0;
}

html.dark .header {
    background: rgba(13, 17, 23, 0.95);
}

html.dark .mobile-menu-header { border-bottom-color: #30363d; }
html.dark .mobile-menu-header .logo { color: #e0e0e0; }
html.dark .mobile-menu-header .el-button { color: #8b949e; }
html.dark .mobile-menu-nav a { color: #e0e0e0; border-bottom-color: #30363d; }
html.dark .mobile-menu-nav a:hover, html.dark .mobile-menu-nav a.active { color: #409eff; background: rgba(64, 158, 255, 0.12); }
html.dark .mobile-menu-nav a .el-icon { color: #8b949e; }
html.dark .mobile-menu-nav a:hover .el-icon, html.dark .mobile-menu-nav a.active .el-icon { color: #409eff; }
html.dark .mobile-menu-divider { background: #30363d; }

html.dark .logo span {
    color: inherit;
}

html.dark .main {
    color: #e0e0e0;
}

html.dark .hero,
html.dark .profile {
    background: radial-gradient(circle at 20% 30%, #1e3a5f 0%, #0d1b2a 60%, #09101a 100%);
}

html.dark .card,
html.dark .plan-card,
html.dark .feature-card,
html.dark .step-card,
html.dark .use-case-card,
html.dark .preview-card,
html.dark .result-card,
html.dark .section-card {
    background: #161b22;
    color: #e0e0e0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: #30363d;
}

html.dark .card h2,
html.dark .plan-card h3,
html.dark .feature-card h3,
html.dark .step-card h3,
html.dark .use-case-card h3,
html.dark .preview-card h3,
html.dark .plan-info h3,
html.dark .stat-value,
html.dark .plan-price {
    color: #f0f0f0;
}

html.dark .card p,
html.dark .plan-desc,
html.dark .plan-features,
html.dark .plan-feature,
html.dark .feature-card p,
html.dark .step-card p,
html.dark .use-case-card p,
html.dark .preview-card p,
html.dark .plan-info p,
html.dark .stat-label,
html.dark .address-text,
html.dark .recent-title,
html.dark .trace-label {
    color: #b0b8c4;
}

html.dark .address-item,
html.dark .order-item {
    border-bottom-color: #30363d;
}

html.dark .address-tag,
html.dark .credentials-box {
    background: #1c2128;
    color: #e0e0e0;
    border: 1px solid #30363d;
}

html.dark .warning-tip {
    background: #332211;
    border-color: #5c4010;
    color: #e6a23c;
}

html.dark .cta {
    background: linear-gradient(135deg, #1e3a5f, #0d1b2a);
}

html.dark .footer {
    background: #0d1117;
    color: #8b949e;
}

html.dark .json-pre {
    background: #161b22;
    color: #e0e0e0;
    border: 1px solid #30363d;
}

/* 标题与副标题 */
html.dark .section-title h2,
html.dark .main > div > h2,
html.dark .card h2 {
    color: #f0f0f0;
}

html.dark .section-title p,
html.dark .plan-price small,
html.dark .login-tip,
html.dark .empty-state {
    color: #b0b8c4;
}

/* 覆盖内联样式 */
html.dark h2[style*="color: #1a1a1a"] {
    color: #f0f0f0 !important;
}

html.dark p[style*="color: #606266"],
html.dark div[style*="color: #606266"],
html.dark span[style*="color: #606266"] {
    color: #b0b8c4 !important;
}

html.dark p[style*="color: #909399"],
html.dark div[style*="color: #909399"],
html.dark span[style*="color: #909399"] {
    color: #8b949e !important;
}

/* 首页搜索框 */
html.dark .search-box {
    background: rgba(30, 41, 59, 0.96);
}

html.dark .search-box input,
html.dark .search-box .el-input__inner {
    color: #e0e0e0;
}

html.dark .search-box .el-input__inner::placeholder {
    color: #8b949e;
}

/* 图标背景透明淡色 */
html.dark .feature-icon,
html.dark .plan-icon,
html.dark .use-case-card .feature-icon {
    filter: brightness(1.15);
    opacity: 0.95;
}

html.dark .feature-icon[style*="color: #409eff"],
html.dark .plan-icon,
html.dark .feature-card .feature-icon {
    background: rgba(64, 158, 255, 0.18) !important;
}

html.dark .feature-icon[style*="color: #67c23a"] {
    background: rgba(103, 194, 58, 0.18) !important;
}

html.dark .feature-icon[style*="color: #f56c6c"] {
    background: rgba(245, 108, 108, 0.18) !important;
}

html.dark .feature-icon[style*="color: #e6a23c"],
html.dark .use-case-card .feature-icon {
    background: rgba(230, 162, 60, 0.18) !important;
}

/* 监控说明卡片 */
html.dark .info-card {
    background: #0e253a !important;
    border-color: #1e5c8a !important;
}

html.dark .info-card .el-card__header {
    border-bottom-color: #1e5c8a;
}

html.dark .warning-card {
    background: #332211 !important;
    border-color: #5c4010 !important;
}

html.dark .warning-card .el-card__header {
    border-bottom-color: #5c4010;
}

html.dark .danger-card {
    background: #331818 !important;
    border-color: #5c2020 !important;
}

html.dark .danger-card .el-card__header {
    border-bottom-color: #5c2020;
}

html.dark .info-title { color: #6ab2ff; }
html.dark .warning-title { color: #e6a23c; }
html.dark .danger-title { color: #f56c6c; }

/* 个人中心卡片标题下划线 */
html.dark .card-header {
    border-bottom-color: #30363d;
}

/* 页脚链接 */
html.dark .footer a {
    color: #8b949e;
}

html.dark .footer a:hover {
    color: #409eff;
}

/* 免费套餐按钮（灰底，支持暗色模式） */
.free-plan-btn {
    --el-button-bg-color: var(--el-fill-color-light);
    --el-button-text-color: var(--el-text-color-regular);
    --el-button-border-color: var(--el-border-color);
    --el-button-hover-bg-color: var(--el-fill-color);
    --el-button-hover-text-color: var(--el-text-color-primary);
    --el-button-hover-border-color: var(--el-border-color);
    --el-button-active-bg-color: var(--el-fill-color);
    --el-button-active-text-color: var(--el-text-color-primary);
    --el-button-active-border-color: var(--el-border-color);
    --el-button-disabled-bg-color: var(--el-fill-color-light);
    --el-button-disabled-text-color: var(--el-text-color-regular);
    --el-button-disabled-border-color: var(--el-border-color);
}

html.dark .page-loader {
    background: #0d1117;
    color: #b0b8c4;
}
