/*
* 文件名称: technology.css
* 功能说明: AI炒股技术原理页面专用样式文件
* 创建日期: 2025年1月
* 作者: AI炒股学习网开发团队
* 说明: 定义技术原理页面的布局、动画和视觉效果
*/

/* ==================== 页面标题区域 ==================== */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    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="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>') repeat;
    opacity: 0.3;
}

.page-title {
    position: relative;
    z-index: 2;
}

.page-title h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: #e3f2fd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.separator {
    margin: 0 0.5rem;
}

/* ==================== 技术架构概览 ==================== */
.tech-overview {
    padding: 80px 0;
    background: #f8f9fa;
}

.tech-overview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a1a2e;
}

.architecture-diagram {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.layer {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.layer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: width 0.3s ease;
}

.layer-1::before { background: #4caf50; }
.layer-2::before { background: #2196f3; }
.layer-3::before { background: #ff9800; }
.layer-4::before { background: #d32f2f; }

.layer:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.layer:hover::before {
    width: 8px;
}

.layer h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.layer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-item {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: scale(1.05);
}

/* ==================== 核心技术详解 ==================== */
.core-technologies {
    padding: 80px 0;
    background: white;
}

.core-technologies h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: #1a1a2e;
}

.tech-section {
    margin-bottom: 4rem;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 3rem;
    transition: all 0.3s ease;
}

.tech-section:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.tech-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-header h3 {
    font-size: 2rem;
    color: #1a1a2e;
    margin: 0;
}

.tech-badge {
    background: linear-gradient(45deg, #d32f2f, #f44336);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tech-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
}

/* ==================== 算法网格布局 ==================== */
.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.algorithm-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.algorithm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f, #f44336);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.algorithm-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

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

.algorithm-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.algorithm-card h4 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.algorithm-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.algorithm-features {
    list-style: none;
    padding: 0;
}

.algorithm-features li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.algorithm-features li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #d32f2f;
    font-size: 0.8rem;
}

/* ==================== 神经网络类型 ==================== */
.neural-network-types {
    margin-top: 2rem;
}

.network-type {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.network-type:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.network-type h4 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.network-details p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.code-example {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid #2196f3;
}

.code-example h5 {
    margin-bottom: 1rem;
    color: #1a1a2e;
    font-size: 1rem;
}

.code-example pre {
    background: #1a1a2e;
    color: #e3f2fd;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 0;
}

/* ==================== 强化学习框架 ==================== */
.rl-framework {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.rl-component {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.rl-component:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.rl-component h4 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rl-component ul {
    list-style: none;
    padding: 0;
}

.rl-component li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.rl-component li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: #4caf50;
}

.rl-algorithms {
    margin-top: 3rem;
}

.rl-algorithms h4 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 2rem;
    text-align: center;
}

.algorithm-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.algorithm-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.algorithm-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.algorithm-item h5 {
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.algorithm-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.complexity {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==================== 数据融合技术 ==================== */
.data-fusion {
    padding: 80px 0;
    background: #f8f9fa;
}

.data-fusion h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1a1a2e;
}

.fusion-overview {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.data-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.data-category {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.data-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.data-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.data-category:hover::before {
    transform: scaleX(1);
}

.data-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.data-category h3 {
    font-size: 1.4rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
}

.data-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-bottom: 2rem;
}

.data-list li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.data-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

.processing-method {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    text-align: left;
}

.fusion-techniques h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a1a2e;
}

.technique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.technique-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.technique-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.technique-card h4 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.technique-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.pros-cons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pros {
    color: #4caf50;
    font-size: 0.9rem;
}

.cons {
    color: #f44336;
    font-size: 0.9rem;
}

/* ==================== 实时处理技术 ==================== */
.realtime-processing {
    padding: 80px 0;
    background: white;
}

.realtime-processing h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: #1a1a2e;
}

.processing-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.pipeline-stage {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    position: relative;
}

.pipeline-stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stage-number {
    background: linear-gradient(45deg, #d32f2f, #f44336);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
}

.pipeline-stage h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.pipeline-stage p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.pipeline-stage ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.pipeline-stage li {
    padding: 0.3rem 0;
    color: #555;
    font-size: 0.85rem;
    position: relative;
    padding-left: 1rem;
}

.pipeline-stage li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #d32f2f;
}

.pipeline-arrow {
    font-size: 2rem;
    color: #d32f2f;
    font-weight: bold;
    margin: 0 1rem;
}

.performance-metrics {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
}

.performance-metrics h3 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-bottom: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.metric-item {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
}

/* ==================== 技术发展趋势 ==================== */
.tech-trends {
    padding: 80px 0;
    background: #f8f9fa;
}

.tech-trends h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: #1a1a2e;
}

.trends-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.trends-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d32f2f;
    transform: translateX(-50%);
}

.trend-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.trend-item:nth-child(odd) {
    flex-direction: row;
}

.trend-item:nth-child(even) {
    flex-direction: row-reverse;
}

.trend-year {
    background: linear-gradient(45deg, #d32f2f, #f44336);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 120px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.trend-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex: 1;
    margin: 0 2rem;
    transition: all 0.3s ease;
}

.trend-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.trend-content h3 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trend-content ul {
    list-style: none;
    padding: 0;
}

.trend-content li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.trend-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #d32f2f;
}

/* ==================== 学习资源推荐 ==================== */
.learning-resources {
    padding: 80px 0;
    background: white;
}

.learning-resources h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: #1a1a2e;
}

.resource-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.resource-category {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.resource-category:hover {
    background: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.resource-category h3 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    margin-bottom: 0.8rem;
}

.resource-list a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
}

.resource-list a:hover {
    color: #d32f2f;
    background: #fff5f5;
    transform: translateX(5px);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .tech-overview,
    .core-technologies,
    .data-fusion,
    .realtime-processing,
    .tech-trends,
    .learning-resources {
        padding: 40px 0;
    }
    
    .tech-section {
        padding: 2rem 1.5rem;
    }
    
    .algorithm-grid {
        grid-template-columns: 1fr;
    }
    
    .processing-pipeline {
        flex-direction: column;
    }
    
    .pipeline-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .trends-timeline::before {
        left: 20px;
    }
    
    .trend-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 60px;
    }
    
    .trend-year {
        position: absolute;
        left: 0;
        top: 0;
        min-width: auto;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .trend-content {
        margin: 1rem 0 0 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title h1 {
        font-size: 2rem;
    }
    
    .tech-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .data-types,
    .technique-grid,
    .resource-categories {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric-value {
        font-size: 2rem;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 打印样式 ==================== */
@media print {
    .header,
    .footer,
    .back-to-top {
        display: none !important;
    }
    
    .page-header {
        background: none !important;
        color: black !important;
        padding: 20px 0;
    }
    
    .tech-section,
    .data-category,
    .technique-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .algorithm-card,
    .network-type,
    .rl-component {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
}