/**
 * frontend.css - 前台公共样式
 * 设计风格：简洁、专业、克制，去除AI设计味
 * 主色：深蓝 #2563eb，纯色为主，少用渐变
 */

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #f8fafc;
    color: #334155;
    line-height: 1.6;
    font-size: 15px;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ===== 布局 ===== */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}
.main-content {
    padding-top: 60px;
    min-height: calc(100vh - 200px);
}
.section {
    padding: 48px 0;
}
.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i {
    color: #2563eb;
    font-size: 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
.nav-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}
.nav-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-menu a {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    transition: color 0.15s, background 0.15s;
    font-weight: 500;
}
.nav-menu a:hover {
    color: #2563eb;
    background: #f1f5f9;
}
.nav-menu a.active {
    color: #2563eb;
    background: #eff6ff;
}
.nav-admin-btn {
    padding: 7px 18px !important;
    background: #2563eb !important;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px !important;
    margin-left: 8px;
}
.nav-admin-btn:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #475569;
    padding: 6px 10px;
}

/* ===== Hero 区域 ===== */
.hero {
    background: #1e293b url('/static/images/hero-bg.jpg') right center / cover no-repeat;
    color: #fff;
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 45%;
    background: linear-gradient(to right, rgba(30,41,59,0.85) 0%, rgba(30,41,59,0.5) 60%, transparent 100%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(30,41,59,0.2) 0%, transparent 25%, transparent 75%, rgba(30,41,59,0.15) 100%);
    pointer-events: none;
}
.hero-content {
    max-width: 540px;
    margin: 0;
    text-align: left;
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.3;
    color: #fff;
}
.hero p {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 28px;
    line-height: 1.8;
}
.hero-search {
    display: flex;
    max-width: 460px;
    margin: 0 0 20px;
    gap: 0;
}
.hero-search input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #334155;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    background: #0f172a;
    color: #fff;
    outline: none;
}
.hero-search input::placeholder { color: #64748b; }
.hero-search input:focus { border-color: #2563eb; }
.hero-search button {
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.hero-search button:hover { background: #1d4ed8; }
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.hero-btn {
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}
.hero-btn-outline {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
}
.hero-btn-outline:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.hero-btn-primary {
    background: #2563eb;
    color: #fff;
}
.hero-btn-primary:hover { background: #1d4ed8; }

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.card-body { padding: 24px; }

/* ===== 工具卡片 ===== */
.tool-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 22px;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
}
.tool-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(37,99,235,0.08);
}
.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.tool-card-icon img {
    width: 100%; height: 100%;
    border-radius: 8px;
    object-fit: cover;
}
.tool-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}
.tool-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tool-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
}
.tool-card-badge {
    position: absolute;
    top: 14px; right: 14px;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}
.btn-outline:hover { background: #eff6ff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: #f1f5f9;
    color: #475569;
}
.tag-primary {
    background: #eff6ff;
    color: #2563eb;
}

/* ===== 分类筛选 ===== */
.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.category-filter a {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}
.category-filter a:hover {
    border-color: #2563eb;
    color: #2563eb;
}
.category-filter a.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
    font-weight: 500;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #334155;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ===== 提示框 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ===== 页脚 ===== */
.footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0 20px;
    margin-top: 48px;
}
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}
.footer-col { flex: 1; min-width: 180px; }
.footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 600;
}
.footer-col ul { font-size: 13px; line-height: 2; }
.footer-col a { color: #94a3b8; }
.footer-col a:hover { color: #fff; }
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.footer-brand-icon {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.footer-brand-name {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}
.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 18px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}
.footer-bottom a { color: #64748b; }

/* ===== 接单页面专用 ===== */
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: #475569;
}
.contact-item-icon {
    width: 36px; height: 36px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.contact-item-icon.email { background: #fef2f2; color: #dc2626; }
.contact-item-icon.wechat { background: #f0fdf4; color: #16a34a; }
.contact-item-icon.qq { background: #eff6ff; color: #2563eb; }
.contact-item-icon.github { background: #f8fafc; color: #334155; }
.contact-item-icon.blog { background: #fffbeb; color: #d97706; }

.service-item {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.15s;
}
.service-item:hover { border-color: #93c5fd; }
.service-item-icon {
    width: 40px; height: 40px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}
.service-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}
.service-item p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.skill-tag {
    display: inline-block;
    padding: 5px 14px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-size: 13px;
    margin: 4px;
    transition: all 0.15s;
}
.skill-tag:hover {
    background: #2563eb;
    color: #fff;
}

.step-timeline {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}
.step-item {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    text-align: center;
    position: relative;
}
.step-item-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin: 0 auto 10px;
}
.step-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}
.step-item-desc {
    font-size: 12px;
    color: #94a3b8;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.faq-question i { color: #2563eb; font-size: 13px; }
.faq-answer {
    font-size: 13px;
    color: #64748b;
    line-height: 1.8;
    padding-left: 22px;
}

.guarantee-item {
    text-align: center;
    padding: 16px;
}
.guarantee-item i {
    font-size: 24px;
    color: #2563eb;
    margin-bottom: 8px;
}
.guarantee-item h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}
.guarantee-item p {
    font-size: 12px;
    color: #94a3b8;
}

/* ===== 富文本内容 ===== */
.rich-content p { margin-bottom: 12px; line-height: 1.8; color: #475569; }
.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 {
    margin: 20px 0 12px; font-weight: 600; color: #1e293b; line-height: 1.4;
}
.rich-content h1 { font-size: 24px; }
.rich-content h2 { font-size: 20px; }
.rich-content h3 { font-size: 18px; }
.rich-content h4 { font-size: 16px; }
.rich-content ul, .rich-content ol { margin: 12px 0; padding-left: 24px; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin-bottom: 6px; line-height: 1.8; color: #475569; }
.rich-content blockquote {
    margin: 16px 0; padding: 12px 16px;
    border-left: 3px solid #2563eb;
    background: #f8fafc; color: #64748b;
    border-radius: 0 6px 6px 0;
}
.rich-content code {
    background: #f1f5f9; padding: 2px 6px; border-radius: 4px;
    font-family: Consolas, Monaco, monospace; font-size: 13px; color: #dc2626;
}
.rich-content pre {
    background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 6px;
    overflow-x: auto; margin: 16px 0; line-height: 1.6;
}
.rich-content pre code { background: none; padding: 0; color: inherit; }
.rich-content img { max-width: 100%; border-radius: 6px; margin: 12px 0; }
.rich-content a { color: #2563eb; text-decoration: underline; }
.rich-content a:hover { color: #1d4ed8; }
.rich-content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.rich-content th, .rich-content td { border: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; }
.rich-content th { background: #f8fafc; font-weight: 600; }
.rich-content hr { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 12px 20px;
        gap: 4px;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .nav-menu.show { display: flex; }
    .nav-menu a { width: 100%; }
    .nav-admin-btn { margin-left: 0; margin-top: 4px; text-align: center; }
    .nav-toggle { display: block; }
    .hero h1 { font-size: 28px; }
    .hero { padding: 56px 0 44px; }
    .section { padding: 36px 0; }
    .footer-grid { flex-direction: column; }
}

/* 接单板块脉冲动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
