/* Clash下载站 - 冷色调主题样式 */

/* 全局变量 */
:root {
    /* 主色调 - 冷色系 */
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;
    
    /* 背景色 */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* 边框和阴影 */
    --border-color: #e2e8f0;
    --border-dark: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 玻璃态效果 */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-backdrop: blur(10px);
    
    /* 动画 */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white) !important;
    transition: var(--transition-normal);
}

.navbar-brand:hover {
    color: var(--primary-light) !important;
    transform: translateY(-1px);
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-dark) 50%, var(--primary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    background: linear-gradient(135deg, var(--text-white) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section h2 {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-image {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid var(--text-white);
    color: var(--text-white);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--text-white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    background: var(--bg-white);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.feature-card {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.download-card {
    text-align: center;
    padding: 1.5rem;
}

.download-card .platform-icon {
    margin-bottom: 1rem;
}

.version-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.subscribe-card {
    border: 2px solid transparent;
    transition: var(--transition-normal);
}

.subscribe-card.border-primary {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, var(--bg-white) 100%);
}

.subscribe-card:hover {
    border-color: var(--primary-light);
}

.tutorial-card {
    padding: 1.5rem;
}

.tutorial-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.news-card {
    transition: var(--transition-normal);
}

.news-card:hover {
    background: var(--bg-light);
}

/* 新闻列表页样式 */
.news-item {
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
}

.news-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.news-meta {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.article-stats {
    font-size: 0.8rem;
}

/* 文章详情页样式 */
.article-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.article-header .container {
    position: relative;
    z-index: 2;
}

.breadcrumb-dark .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-dark .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-dark .breadcrumb-item a:hover {
    color: var(--text-white);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    color: var(--primary-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.article-content h4 {
    color: var(--secondary-dark);
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-intro {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

/* 侧边栏样式 */
.sidebar-widget {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.widget-title {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.related-articles {
    font-size: 0.9rem;
}

.related-article {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.related-article:last-child {
    border-bottom: none;
}

.related-article a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.related-article a:hover {
    color: var(--primary-color);
}

.tag-cloud .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem;
    transition: var(--transition-fast);
}

.tag-cloud .badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.recommendation-card {
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.recommendation-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* 评论区样式 */
.comments-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.comment-form {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.comment {
    background: var(--bg-white);
    border-left: 3px solid var(--primary-color);
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.page-link:hover {
    color: var(--primary-dark);
    background-color: var(--bg-light);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 表单样式 */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-dark);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-left-color: #f59e0b;
    color: #92400e;
}

/* 手风琴样式 */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-button {
    background: var(--bg-light);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition-fast);
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: var(--text-white);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-light);
}

footer h5,
footer h6 {
    color: var(--text-white);
    font-weight: 600;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

footer a:hover {
    color: var(--primary-light);
}

.social-links a {
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--primary-light) !important;
    transform: translateY(-2px);
}

/* 页面头部样式 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="wave" width="100" height="20" patternUnits="userSpaceOnUse"><path d="M0 10 Q25 0 50 10 T100 10 V20 H0 Z" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23wave)"/></svg>');
    opacity: 0.2;
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .sidebar-widget {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2a2a2a;
        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --border-color: #334155;
    }
    
    body {
        background-color: var(--bg-white);
        color: var(--text-primary);
    }
    
    .card {
        background: var(--bg-light);
        color: var(--text-primary);
    }
    
    .form-control {
        background: var(--bg-light);
        color: var(--text-primary);
        border-color: var(--border-color);
    }
    
    .form-control:focus {
        background: var(--bg-light);
        color: var(--text-primary);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-dark);
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: var(--text-white);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--text-white);
}

/* 玻璃态效果类 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* 渐变背景类 */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
}

/* 文字渐变效果 */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 悬停效果 */
.hover-lift {
    transition: var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* 边框发光效果 */
.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light), var(--primary-color));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: var(--transition-normal);
}

.glow:hover::before {
    opacity: 1;
    animation: glow 2s linear infinite;
}

@keyframes glow {
    0% { filter: blur(5px) opacity(0.7); }
    50% { filter: blur(10px) opacity(1); }
    100% { filter: blur(5px) opacity(0.7); }
}