/* UI组件样式文件 - 现代化组件库 */

/* FAQ 折叠面板组件 */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    background: linear-gradient(135deg, transparent 0%, rgba(59, 130, 246, 0.03) 100%);
    border: none;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 70px;
}

.faq-question span {
    flex: 1;
    margin-right: 1rem;
    line-height: 1.4;
}

.faq-question:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.faq-question.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary-color);
}

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: 1rem;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
    background: var(--secondary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--bg-secondary);
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer-content {
    padding-top: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Dark theme tune for FAQ */
[data-theme="dark"] .faq-question, .dark .faq-question {
    background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(139,92,246,0.08) 100%);
    color: var(--text-primary);
}
[data-theme="dark"] .faq-question:hover, .dark .faq-question:hover {
    background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(139,92,246,0.15) 100%);
}
[data-theme="dark"] .faq-question.active, .dark .faq-question.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.2) 0%, rgba(139,92,246,0.2) 100%);
    color: #93c5fd;
}
[data-theme="dark"] .faq-answer, .dark .faq-answer {
    background: rgba(255,255,255,0.05);
}
[data-theme="dark"] .faq-answer-content, .dark .faq-answer-content {
    color: var(--text-secondary);
}

/* 使用步骤组件 */
.steps-container {
    max-width: 1000px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 2rem;
    top: 4rem;
    width: 2px;
    height: calc(100% + 1rem);
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    opacity: 0.3;
}

.step-number {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.step-number::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.2;
    animation: pulse 2s infinite;
}

.step-content {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.step-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.step-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.step-code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
    position: relative;
}

/* 时间线组件 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 5rem;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.timeline-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 2rem;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: -7px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--bg-primary) transparent transparent;
}

.timeline-version {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-changes {
    list-style: none;
    padding: 0;
}

.timeline-changes li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.timeline-changes li:hover {
    background: var(--bg-secondary);
}

.timeline-changes li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* 卡片组件 */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* 按钮组件 */
/* Buttons: unified, subtle, theme-aware */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    font-size: 0.975rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.45s ease, height 0.45s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(99,102,241,0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -6px rgba(99,102,241,0.5);
    filter: saturate(1.05);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-width: 2px;
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Platform download buttons */
.platform-btn {
    height: 3.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.45);
}
.platform-btn i { opacity: 0.9; }
.platform-windows i { color: #2563eb; }
.platform-macos i { color: #6b7280; }
.platform-linux i { color: #f59e0b; }
[data-theme="dark"] .platform-btn {
    background: rgba(255,255,255,0.02);
}

/* Focus ring */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.35), var(--shadow-lg);
}

/* 警告提示框组件 */
.alert {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: 1rem;
    background: var(--bg-primary);
}

.alert-info {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.alert-success {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.alert-warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.alert-error {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
}

.alert-info .alert-icon {
    background: #3b82f6;
    color: white;
}

.alert-success .alert-icon {
    background: #10b981;
    color: white;
}

.alert-warning .alert-icon {
    background: #f59e0b;
    color: white;
}

.alert-error .alert-icon {
    background: #ef4444;
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.alert-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 语言切换菜单 */
#languageMenu.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* 内容卡片组件 */
.content-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.content-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 徽章组件 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-info {
    background: #06b6d4;
    color: white;
}

/* 警告框组件 */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-description {
    opacity: 0.9;
    line-height: 1.5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #065f46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #991b1b;
}

/* 加载组件 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 模态框组件 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 工具提示组件 */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip-container:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .step-item:not(:last-child)::after {
        left: 2rem;
        top: 5rem;
        height: 2rem;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .timeline-item {
        padding-left: 0;
        padding-top: 5rem;
        text-align: center;
    }

    .timeline::before {
        display: none;
    }

    .timeline-marker {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-content::before,
    .timeline-content::after {
        display: none;
    }

    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }

    .faq-answer.active {
        padding: 0 1rem 1rem;
    }

    /* 移动端导航优化 */
    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        display: block;
        width: 100%;
    }

    /* 移动端卡片优化 */
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* 移动端按钮优化 */
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .btn + .btn {
        margin-top: 0.5rem;
    }

    /* 移动端网格优化 */
    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    /* 移动端文字大小调整 */
    .text-5xl {
        font-size: 2.5rem;
    }

    .text-6xl {
        font-size: 3rem;
    }

    .text-4xl {
        font-size: 2rem;
    }

    .text-3xl {
        font-size: 1.75rem;
    }

    /* 移动端间距调整 */
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .mb-16 {
        margin-bottom: 2.5rem;
    }

    .mb-12 {
        margin-bottom: 2rem;
    }

    /* 移动端容器优化 */
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* 移动端模态框优化 */
    .modal {
        width: 95%;
        margin: 1rem;
    }

    .modal-body {
        max-height: 60vh;
    }

    /* 移动端表格优化 */
    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* 小屏幕优化 (小于 480px) */
@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .text-5xl {
        font-size: 2rem;
    }

    .text-6xl {
        font-size: 2.5rem;
    }

    .py-20 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* 小屏幕卡片优化 */
    .card {
        border-radius: 0.75rem;
    }

    .card-header,
    .card-body {
        padding: 0.75rem;
    }

    /* 小屏幕FAQ优化 */
    .faq-question {
        padding: 0.75rem;
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .faq-icon {
        align-self: flex-end;
        margin-left: 0;
    }

    /* 小屏幕时间线优化 */
    .timeline-marker {
        width: 3rem;
        height: 3rem;
        font-size: 1rem;
    }

    /* 小屏幕步骤优化 */
    .step-number {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }

    .step-content {
        padding: 1rem;
    }

    /* 小屏幕按钮优化 */
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* 大屏幕优化 (大于 1200px) */
@media (min-width: 1200px) {
    /* 大屏幕容器优化 */
    .max-w-7xl {
        max-width: 1280px;
    }

    /* 大屏幕文字优化 */
    .text-7xl {
        font-size: 5rem;
    }

    .text-6xl {
        font-size: 4rem;
    }

    .text-5xl {
        font-size: 3.5rem;
    }

    /* 大屏幕间距优化 */
    .py-20 {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .py-16 {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    /* 大屏幕网格优化 */
    .xl\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .xl\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备按钮优化 */
    .btn,
    .faq-question,
    .nav-link {
        min-height: 44px; /* 符合苹果和谷歌的最小触摸区域建议 */
    }

    /* 触摸设备悬停效果禁用 */
    .hover\:scale-105:hover,
    .hover\:scale-110:hover,
    .hover\:-translate-y-2:hover {
        transform: none;
    }

    /* 触摸反馈 */
    .btn:active,
    .faq-question:active,
    .nav-link:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 高分辨率图标优化 */
    .fas,
    .fab {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 打印样式优化 */
@media print {
    /* 隐藏不必要的元素 */
    nav,
    footer,
    .btn,
    .floating-element,
    #backToTop {
        display: none !important;
    }

    /* 打印时的背景和颜色 */
    body {
        background: white !important;
        color: black !important;
    }

    .card,
    .content-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    /* 打印时的字体大小 */
    .text-6xl,
    .text-5xl {
        font-size: 2rem !important;
    }

    .text-4xl {
        font-size: 1.5rem !important;
    }

    .text-3xl {
        font-size: 1.25rem !important;
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .alert-info, .dark .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: #3b82f6;
}

[data-theme="dark"] .alert-success, .dark .alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: #10b981;
}

[data-theme="dark"] .alert-warning, .dark .alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: #f59e0b;
}

[data-theme="dark"] .alert-danger, .dark .alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: #ef4444;
}

[data-theme="dark"] .loading-overlay, .dark .loading-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .tooltip-text, .dark .tooltip-text {
    background: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] .tooltip-text::after, .dark .tooltip-text::after {
    border-top-color: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .card, .dark .card {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-header, .dark .card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal, .dark .modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-header, .dark .modal-header {
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-footer, .dark .modal-footer {
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary, .dark .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary:hover, .dark .btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: rgba(59, 130, 246, 0.5);
}

[data-theme="dark"] .platform-btn, .dark .platform-btn {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .platform-btn:hover, .dark .platform-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(59, 130, 246, 0.5);
}

/* 无障碍访问优化 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-float,
    .animate-float-delayed,
    .animate-float-slow,
    .animate-pulse {
        animation: none !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .card,
    .content-card {
        border: 2px solid var(--border-color);
    }

    .alert {
        border-width: 2px;
    }
}

/* 强制颜色模式支持 */
@media (forced-colors: active) {
    .btn {
        forced-color-adjust: none;
        border: 1px solid ButtonText;
    }

    .card {
        forced-color-adjust: none;
        border: 1px solid CanvasText;
    }
}
