/* KK输入法官网样式 */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* 渐变背景 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Dark mode 支持 */
[data-bs-theme="dark"] .bg-gradient-primary {
    background: linear-gradient(135deg, #2a3a6a 0%, #3a2248 100%);
}

[data-bs-theme="dark"] .btn-primary {
    background-color: #5a7fd4;
    border-color: #5a7fd4;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #4a6fc4;
    border-color: #4a6fc4;
}

/* Hero 区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

/* 应用窗口模拟 */
.hero-mockup {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.app-window {
    max-width: 400px;
    margin: 0 auto;
}

.window-header {
    border-bottom: 1px solid #e9ecef;
}

.window-btn {
    width: 12px;
    height: 12px;
    display: inline-block;
}

.candidate-window {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
}

.input-area {
    font-weight: 500;
}

.candidate-item {
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.candidate-item.active {
    background-color: var(--primary-color);
    color: white;
}

.candidate-item:hover {
    background-color: #e9ecef;
}

/* 功能特色卡片 */
.feature-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 下载卡片 */
.download-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 16px;
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* 支持卡片 */
.support-card {
    transition: transform 0.3s;
    border-radius: 12px;
    height: 100%;
}

.support-card:hover {
    transform: translateY(-3px);
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e9ecef;
}

.timeline-content {
    margin-left: 20px;
}

/* 按钮动画 */
.btn {
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 100px;
    }

    .display-4 {
        font-size: 2.5rem;
    }

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

    .app-window {
        max-width: 300px;
    }
}

/* 导航栏固定时的间距调整 */
.navbar.fixed-top + section {
    padding-top: 80px;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主题预览样式 */
.theme-preview {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

.theme-preview:hover {
    transform: scale(1.05);
}

.theme-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* 代码块样式 */
code {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 链接样式 */
a {
    transition: color 0.3s;
}

/* 卡片阴影增强 */
.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}