/* 陌城qqbot框架 官网前台样式 - 美化版 */
/* 主色调:靛蓝渐变 + 毛玻璃 */

/* ============ 基础重置 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --text: #0f172a;
    --text-light: #475569;
    --text-muted: #94a3b8;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
    --shadow-primary: 0 8px 24px rgba(99, 102, 241, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-text: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.7;
    padding-top: 72px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ============ 容器 ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ 导航栏 ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 4px 20px rgba(15, 23, 42, 0.04);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.logo:hover {
    opacity: 0.85;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    box-shadow: var(--shadow-primary);
    -webkit-text-fill-color: #fff;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
    background-color: var(--primary-bg);
}

.nav-links a.active {
    color: var(--primary);
    background-color: var(--primary-bg);
    font-weight: 600;
}

/* ============ 主内容区 ============ */
.main-content {
    padding-top: 48px;
    padding-bottom: 80px;
    min-height: calc(100vh - 72px - 88px);
    animation: fadeIn 0.5s ease;
}

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

/* ============ 首页 Hero ============ */
.hero {
    position: relative;
    background: var(--gradient);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 80px 48px 64px;
    text-align: center;
    margin-bottom: 64px;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35);
    overflow: hidden;
}

/* Hero 装饰光斑 */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}

.hero::before {
    width: 300px;
    height: 300px;
    background: #fbbf24;
    top: -100px;
    right: -50px;
}

.hero::after {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    bottom: -80px;
    left: -50px;
}

.hero h1 {
    position: relative;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    z-index: 1;
}

.hero .subtitle {
    position: relative;
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 32px;
    z-index: 1;
}

.hero .version-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 36px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.hero .version-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3);
}

.hero-actions {
    position: relative;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 1;
}

/* Hero 区联系方式 */
.hero-contacts {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
    z-index: 1;
}

.hero-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.hero-contact-item:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.hero-contact-item .contact-icon {
    font-size: 16px;
}

.hero-contact-item .contact-label {
    opacity: 0.85;
}

.hero-contact-item .contact-content {
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* 联系我们区块 */
.contact-section {
    margin-bottom: 64px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.contact-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.contact-card .contact-card-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--primary-bg);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    transform: scale(1.1);
}

.contact-card .contact-card-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.contact-card .contact-card-content {
    font-size: 16px;
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-download {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-download:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background-color: var(--bg);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
}

/* ============ 区块标题 ============ */
.section-title {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* ============ 功能特性 ============ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 64px;
}

.feature-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 14px;
    font-size: 28px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============ 卡片(版本列表) ============ */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============ 版本类型标签 ============ */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.tag-beta {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.tag-official {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.tag-beta::before {
    background: #f97316;
}

.tag-official::before {
    background: #22c55e;
}

/* ============ 页面标题 ============ */
.page-header {
    margin-bottom: 40px;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.empty-state .empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 16px;
}

/* ============ 更新日志/代码块 ============ */
.release-notes {
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px 28px;
    font-family: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-light);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

/* ============ 版本详情页 ============ */
.version-detail-header {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.version-detail-header h1 {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.version-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
}

.version-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.version-detail-body {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.version-detail-body h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ 更新日志列表项 ============ */
.changelog-item {
    display: block;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.changelog-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    color: inherit;
}

.changelog-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.changelog-item-header .version-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.changelog-item .release-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.changelog-item .release-summary {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.changelog-item .view-detail {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.changelog-item:hover .view-detail {
    gap: 8px;
}

/* ============ 404 提示 ============ */
.not-found {
    text-align: center;
    padding: 100px 24px;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.not-found h1 {
    font-size: 72px;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.not-found p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 16px;
}

/* ============ 数据库升级页 ============ */
.upgrade-page {
    max-width: 880px;
    margin: 0 auto 64px;
    padding: 0 8px;
}

.upgrade-page h1 {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.upgrade-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.upgrade-section {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.upgrade-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.upgrade-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upgrade-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upgrade-log li {
    padding: 10px 14px;
    background-color: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-light);
    border-left: 3px solid var(--primary-light);
    line-height: 1.6;
    word-break: break-all;
}

/* 错误区块 */
.upgrade-section-error {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.upgrade-section-error h2 {
    color: #b91c1c;
}

.upgrade-section-error ul li {
    background-color: #ffffff;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* 总结区块 */
.upgrade-section-summary {
    text-align: center;
    padding: 36px 32px;
}

.upgrade-section-summary h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.upgrade-section-summary p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
}

.upgrade-section-summary.has-changes {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.upgrade-section-summary.has-changes h2 {
    color: #15803d;
}

.upgrade-section-summary.no-changes {
    background-color: var(--primary-bg);
    border-color: var(--primary-light);
}

.upgrade-section-summary.no-changes h2 {
    color: var(--primary-dark);
}

/* 操作按钮区 */
.upgrade-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 32px 0;
}

.upgrade-actions .btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-light);
    border: 1px solid var(--border);
}

.upgrade-actions .btn-secondary:hover {
    background-color: var(--bg);
    color: var(--primary);
    border-color: var(--primary);
}

/* 安全警告 */
.upgrade-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.7;
}

.upgrade-warning strong {
    color: #78350f;
}

/* ============ 页脚 ============ */
.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.site-footer .footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
}

.site-footer .footer-brand .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    border-radius: 8px;
}

.site-footer .copyright {
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer .footer-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
}

.site-footer .footer-links a {
    color: var(--text-light);
}

.site-footer .footer-links a:hover {
    color: var(--primary);
}

/* ============ 技术栈展示 ============ */
.tech-stack {
    margin-bottom: 64px;
}

.tech-stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.tech-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* ============ 移动端适配 ============ */
@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }

    .navbar {
        height: 64px;
    }

    .navbar-inner {
        flex-direction: row;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 14px;
    }

    .hero {
        padding: 48px 24px 40px;
    }

    .hero h1 {
        font-size: 32px;
    }

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

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-title {
        font-size: 26px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
    }

    .version-detail-header,
    .version-detail-body {
        padding: 24px;
    }

    .site-footer .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
