/* 重置和基础样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 76px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all 0.3s ease;
}

.navbar-scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 导航栏品牌样式 */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-logo {
    height: 32px; /* 调整高度以适应导航栏 */
    width: auto; /* 保持原始宽高比 */
    object-fit: contain;
}

/* 可选：为Logo添加圆角 */
.navbar-logo.rounded {
    border-radius: 6px;
}

/* 可选：为Logo添加阴影 */
.navbar-logo.shadow {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* 英雄区域样式 */
.hero-section {
    background-color: var(--light-bg);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-weight: 500;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* 特色卡片样式 */
.feature-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0.85rem;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    width: 100%;
    max-width: 280px; /* limit card width so three cards appear compact */
    margin: 0 auto; /* center card inside its column */
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 44px; /* slightly smaller */
    height: 44px;
    border-radius: 8px;
    background-color: rgba(13, 110, 253, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.feature-head h5, .feature-head h3, .feature-head h4 {
    font-size: 1rem;
}

.feature-desc {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.features-video video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Limit the features container width so cards and video align visually */
#features > .container {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

/* Match Download section width to Features */
.download-section > .container {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

/* Documentation page (left nav + right content) */
.docs-section {
    background-color: var(--light-bg);
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.docs-section > .container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.docs-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
    align-items: start;
    min-width: 0;
}

/* Prevent content column overflow in CSS grid (tables/long links) */
.docs-content {
    min-width: 0;
}

.docs-sidebar-card,
.docs-content-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    min-width: 0;
}

.docs-content-card {
    overflow-x: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.docs-content-card table {
    width: 100%;
}

.docs-sidebar {
    position: sticky;
    top: 96px;
}

.docs-sidebar-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.docs-nav-link {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.docs-nav-link:hover {
    background-color: rgba(13, 110, 253, 0.06);
    color: var(--primary-color);
}

.docs-nav-link.active {
    background-color: rgba(13, 110, 253, 0.10);
    color: var(--primary-color);
}

.docs-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.docs-h2 {
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.docs-list {
    color: var(--text-dark);
    padding-left: 1.25rem;
}

.docs-faq {
    display: grid;
    gap: 0.75rem;
}

.docs-faq-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background-color: var(--card-bg);
}

.docs-faq-q {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    .docs-sidebar {
        position: static;
    }
    .docs-section {
        padding: 1.5rem 0 2.5rem;
    }
}

/* On small screens let cards expand naturally and video fit the container */
@media (max-width: 768px) {
    .feature-card { max-width: 100%; padding: 0.85rem; }
    #features > .container { max-width: 100%; padding-left: 1rem; padding-right: 1rem; }
}

/* 下载区域样式 */
.download-section {
    background-color: var(--light-bg);
    padding: 2.5rem 0 5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* 下载主卡片（简洁风格） */
.download-main-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: none;
}

.download-main-card:hover {
    box-shadow: none;
    transform: none;
}

.platform-icon-large {
    font-size: 4.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.platform-icon-large i {
    display: block;
}

.version-info h5 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.version-info p {
    font-size: 1.25rem;
    font-weight: 600;
}

/* 下载次数框 */
.download-count-box {
    background-color: transparent;
    border-radius: 6px;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    border: none;
    text-align: center;
}

/* Two-column download layout specifics */
.download-panel-row {
    /* keep Bootstrap .row behavior */
}
.download-info {
    text-align: left;
    padding-right: 1rem;
    border-right: 1px solid var(--border-color);
}

/* Release-note (screenshot-like) styling for left half */
.download-info .release-block {
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.download-info .release-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.download-info .version-text {
    font-weight: 700;
    color: var(--text-dark);
}

.download-info .release-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.download-info .release-meta i {
    color: var(--text-muted);
}

.download-info .release-list {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.download-info .release-list li {
    margin: 0.35rem 0;
}
.download-actions {
    padding-left: 1rem;
}
.download-actions .download-count {
    font-size: 1.75rem;
}
.download-actions .download-btn {
    min-width: 180px;
}

/* Prevent long MD5 from wrapping under the download button */
.download-file-hints .download-md5-line {
    white-space: nowrap;
}

.download-file-hints .download-md5-line #downloadFileMd5 {
    white-space: nowrap;
    text-overflow: clip;
    font-size: 0.75rem;
}

@media (max-width: 767px) {
    .download-info { border-right: none; padding-right: 0; text-align: center; }
    .download-actions { padding-left: 0; margin-top: 1rem; }
    .download-info .release-meta { justify-content: center !important; gap: 0.75rem; }
    .download-info .release-list { text-align: left; display: inline-block; }
}

.download-count h4 {
    font-size: 2rem;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.download-count p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.download-icon-small {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

/* 下载按钮 */
.download-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    margin-top: 0.5rem;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.2);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

/* 徽章样式 */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

/* 技术支持 */
.feedback-form-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.feedback-type-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feedback-type-buttons .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.feedback-type-buttons .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.feedback-type-buttons .btn:hover:not(.active) {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
}

/* 表单样式增强 */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* 额外信息 */
.additional-info {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    padding: 1.25rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 5s ease-in-out infinite;
}

/* 通用样式 */
.section-title {
    font-weight: 700;
    color: var(--text-dark);
}

.text-muted {
    color: var(--text-muted) !important;
}

.border {
    border-color: var(--border-color) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .download-section {
        padding: 1.5rem 0 3rem;
    }
    
    .download-main-card {
        padding: 1.5rem;
    }
    
    .platform-icon-large {
        font-size: 3.5rem;
    }
    
    .download-count h4 {
        font-size: 1.75rem;
    }
    
    .download-icon-small {
        font-size: 2rem;
    }
    
    .download-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .version-info p {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .download-count h4 {
        font-size: 1.5rem;
    }
    
    .download-count-box {
        padding: 1rem;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* 响应式调整 - 反馈表单 */
@media (max-width: 768px) {
    .feedback-form-card {
        padding: 2rem;
    }
    
    .feedback-type-buttons {
        flex-direction: column;
    }

    .feedback-type-buttons .btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .feedback-form-card {
        padding: 1.5rem;
    }
    
    .form-control {
        padding: 0.5rem 0.75rem;
    }
}

/* Remove vertical gaps between adjacent sections so they sit flush */
section {
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}

/* Keep hero section slightly larger to preserve visual hierarchy */
.hero-section {
    padding-top: 3.5rem; /* maintain some breathing room at page top */
    padding-bottom: 1.5rem;
}

/* If individual sections need internal spacing, use container padding (preserve existing .container py-* classes) */

@media (max-width: 768px) {
    .hero-section {
        padding-top: 2.5rem;
        padding-bottom: 1rem;
    }
}

/* Hero refinements: more compact, clearer CTAs, centered content */
.hero-section {
    background: linear-gradient(180deg, rgba(13,110,253,0.03) 0%, rgba(255,255,255,0) 100%);
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero-title {
    font-size: 2.00rem;
    line-height: 1.05;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 760px;
    margin: 0.5rem auto 1.25rem;
}

.hero-ctas .btn {
    min-width: 160px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

.hero-ctas .btn-primary {
    box-shadow: 0 6px 18px rgba(13,110,253,0.08);
    border-radius: 10px;
}

.hero-ctas .btn-outline-primary {
    border-radius: 10px;
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.9rem; }
    .hero-subtitle { font-size: 0.98rem; }
    .hero-ctas .btn { min-width: 140px; }
}

/* Reduce vertical padding specifically for the Features section to make page tighter */
#features {
    padding-top: 1.5rem !important;
    padding-bottom: 1rem !important;
}

/* Also reduce the container internal vertical padding inside features */
#features > .container {
    padding-top: 1.5rem !important;
    padding-bottom: 1rem !important;
}

@media (max-width: 768px) {
    #features, #features > .container {
        padding-top: 0.5rem !important;
        padding-bottom: 0.75rem !important;
    }
}