/*
Theme Name: 变量网络
Theme URI: gofly.v1kf.com
Author: 程序员老狼
Author URI: gofly.v1kf.com
Description: 主题描述
Version: 1.0
*/

/* ======================== */
/* ==== 主题变量与基础重置 ==== */
/* ======================== */
:root {
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --orange: #f59e0b;
    --orange-hover: #d97706;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f8fafc;
    --border-color: #e5e7eb;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ======================== */
/* ==== 头部导航栏样式 ==== */
/* ======================== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon svg {
    display: block;
}

/* 自定义 Logo 图片 */
.custom-logo-link img {
    height: 36px;
    width: auto;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 4px 0;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

/* 右侧操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.login-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
}

.login-link:hover {
    color: var(--primary-blue);
}

.register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    background: var(--primary-blue);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.register-btn:hover {
    background: var(--primary-blue-hover);
}

/* ======================== */
/* ==== Hero区域样式 ==== */
/* ======================== */
.hero {
    padding: 80px 2rem 60px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-title .text-blue {
    color: var(--primary-blue);
}

.hero-title .text-dark {
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 48px;
    background: var(--orange);
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.hero-cta:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* 插画区域 */
.hero-illustration {
    margin-top: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-illustration img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

/* ======================== */
/* ==== 客服系统样式 ==== */
/* ======================== */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
}

.chat-button {
    background-color: var(--primary-blue);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transition: var(--transition);
    border: none;
    outline: none;
}

.chat-button:hover {
    transform: scale(1.08);
    background-color: var(--primary-blue-hover);
}

.chat-button i {
    font-size: 1.5rem;
}

.chat-box {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    height: 500px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: none;
    transform-origin: bottom right;
    animation: fadeIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-blue), #3b82f6);
    color: white;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 600;
    font-size: 1rem;
}

.close-chat {
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-chat:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chat-body {
    height: calc(100% - 120px);
    padding: 1.2rem;
    overflow-y: auto;
    background-color: var(--bg-gray);
}

.message {
    margin-bottom: 0.8rem;
    max-width: 80%;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 1rem 1rem 0 1rem;
    margin-left: auto;
}

.agent-message {
    background-color: white;
    padding: 0.7rem 1rem;
    border-radius: 1rem 1rem 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chat-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.6rem;
}

.chat-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: none;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.send-button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover {
    background-color: var(--primary-blue-hover);
}

/* ======================== */
/* ==== 内容页面样式 ==== */
/* ======================== */
.page-content {
    max-width: 860px;
    margin: 80px auto;
    padding: 0 2rem;
}

.page-article {
    color: var(--text-dark);
    line-height: 1.9;
}

.page-article h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.page-article h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 48px 0 20px;
    color: var(--text-dark);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-gray);
}

.page-article h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 16px;
    color: var(--text-dark);
}

.page-article h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--text-dark);
}

.page-article h5,
.page-article h6 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-dark);
}

.page-article p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.page-article a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-article a:hover {
    color: var(--primary-blue-hover);
}

.page-article ul,
.page-article ol {
    margin: 16px 0 20px;
    padding-left: 24px;
}

.page-article ul {
    list-style: disc;
}

.page-article ol {
    list-style: decimal;
}

.page-article li {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.8;
}

.page-article li::marker {
    color: var(--primary-blue);
}

.page-article blockquote {
    margin: 28px 0;
    padding: 20px 28px;
    background: var(--bg-gray);
    border-left: 4px solid var(--primary-blue);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.page-article blockquote p {
    margin-bottom: 0;
    color: var(--text-gray);
    font-style: italic;
}

.page-article code {
    background: var(--bg-gray);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #e11d48;
}

.page-article pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.7;
}

.page-article pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.page-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
    display: block;
}

.page-article figure {
    margin: 24px 0;
}

.page-article figcaption {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    margin-top: 8px;
}

.page-article hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 48px 0;
}

.page-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.page-article thead {
    background: var(--bg-gray);
}

.page-article th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.page-article td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.page-article tbody tr:hover {
    background: var(--bg-gray);
}

.page-article strong {
    font-weight: 700;
    color: var(--text-dark);
}

/* WordPress 对齐样式 */
.page-article .alignleft {
    float: left;
    margin: 8px 24px 24px 0;
}

.page-article .alignright {
    float: right;
    margin: 8px 0 24px 24px;
}

.page-article .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-article .wp-caption {
    max-width: 100%;
    margin: 24px 0;
}

.page-article .wp-caption-text {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    margin-top: 8px;
}

/* ======================== */
/* ==== 页脚样式 ==== */
/* ======================== */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 14px;
}

.footer-column ul li a {
    font-size: 14px;
    color: var(--text-gray);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--primary-blue);
}

.footer-brand {
    text-align: right;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.footer-logo-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.footer-logo-subtitle {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.footer-wechat {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.footer-qrcode-label {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.footer-qrcode img {
    width: 100px;
    height: 100px;
    display: block;
    margin-left: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-light);
}

.footer-bottom a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary-blue);
}

/* ======================== */
/* ==== 响应式设计 ==== */
/* ======================== */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        height: 56px;
    }

    .nav-menu {
        display: none;
    }

    .login-link {
        display: none;
    }

    .hero {
        padding: 50px 1.5rem 40px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-cta {
        padding: 10px 36px;
        font-size: 15px;
    }

    .hero-illustration {
        margin-top: 40px;
    }

    .chat-box {
        width: calc(100vw - 2rem);
        height: 420px;
        right: -1rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-brand {
        text-align: left;
        grid-column: span 2;
    }

    .footer-logo {
        justify-content: flex-start;
    }

    .footer-qrcode img {
        margin-left: 0;
    }

    .footer-bottom {
        text-align: left;
    }

    .page-content {
        margin: 40px auto;
        padding: 0 1.5rem;
    }

    .page-article h1 { font-size: 28px; }
    .page-article h2 { font-size: 22px; margin-top: 36px; }
    .page-article h3 { font-size: 18px; }
    .page-article p { font-size: 15px; }
    .page-article blockquote { padding: 16px 20px; }
    .page-article table { font-size: 13px; }
    .page-article th,
    .page-article td { padding: 8px 10px; }
}
