/* 技术方案详情页面通用样式 - 优化版 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-light: #e9ecef;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

.solution-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* 目录样式 - 优化版 */
.table-of-contents {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 280px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 8px 32px var(--shadow-light);
    z-index: 1000;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.table-of-contents:hover {
    box-shadow: 0 12px 48px var(--shadow-medium);
    transform: translateY(-2px);
}

.table-of-contents h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 0;
    border-radius: var(--border-radius-small);
    overflow: hidden;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    padding: 12px 16px;
    border-radius: var(--border-radius-small);
    position: relative;
}

.table-of-contents a:hover,
.table-of-contents a.active {
    color: var(--secondary-color);
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1), transparent);
    transform: translateX(4px);
}

.table-of-contents a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--secondary-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.table-of-contents a:hover::before,
.table-of-contents a.active::before {
    transform: scaleY(1);
}

/* 页面标题 - 优化版 */
.page-header {
    text-align: center;
    margin: 40px 0 80px 0;
    padding: 60px 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius);
    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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.page-header h1 {
    font-size: 3.2em;
    margin: 0 0 16px 0;
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.page-header .subtitle {
    font-size: 1.4em;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* 内容区域 - 优化版 */
.content-section {
    margin: 80px 0;
    padding: 0 20px;
}

.content-section h2 {
    color: var(--text-primary);
    font-size: 2.2em;
    margin: 0 0 40px 0;
    padding-bottom: 16px;
    border-bottom: 4px solid var(--secondary-color);
    position: relative;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
}

.content-section h3 {
    color: var(--text-primary);
    font-size: 1.6em;
    margin: 40px 0 24px 0;
    font-weight: 600;
}

.content-section p {
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 20px 0;
    font-size: 16px;
    font-weight: 400;
}

/* 案例展示卡片 - 优化版 */
.case-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 8px 32px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px var(--shadow-medium);
}

.case-title {
    color: var(--secondary-color);
    font-size: 1.8em;
    margin: 0 0 24px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 代码块样式 - 优化版 */
.code-block {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.code-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.code-header:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.code-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.code-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.code-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.code-toggle.collapsed .code-toggle-icon {
    transform: rotate(-90deg);
}

.code-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.code-content.expanded {
    max-height: 2000px; /* 足够大的值来容纳代码 */
}

.code-content pre {
    margin: 0;
    background: #f8f9fa;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-content code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 表格样式 - 优化版 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
}

.data-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 15px;
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: linear-gradient(90deg, var(--bg-light), transparent);
}

/* 可视化图表容器 - 优化版 */
.chart-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 8px 32px var(--shadow-light);
    text-align: center;
    border: 1px solid var(--border-light);
}

.chart-container h3 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 1.6em;
    font-weight: 600;
}

.chart-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--bg-light), #e8eaf0);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 18px;
    margin: 24px 0;
    border: 2px dashed var(--border-light);
    font-weight: 500;
}

/* 结果展示 - 优化版 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.result-item {
    background: var(--bg-white);
    padding: 28px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--shadow-medium);
}

.result-item h4 {
    color: var(--text-primary);
    margin: 0 0 16px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.result-item .value {
    font-size: 2em;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 8px 0;
    display: block;
}

.result-item p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* 高亮文本 - 优化版 */
.highlight {
    background: linear-gradient(120deg, #a8e6cf 0%, #dcedc1 100%);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(168, 230, 207, 0.3);
}

/* 统计指标卡片 - 优化版 */
.stats-card {
    background: var(--gradient-primary);
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 32px 0;
    box-shadow: 0 8px 32px var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.stats-card .number {
    font-size: 3.5em;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.stats-card .label {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* 响应式设计 - 优化版 */
@media (max-width: 1024px) {
    .table-of-contents {
        width: 240px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .table-of-contents {
        position: static;
        width: 100%;
        margin: 20px 0;
        right: auto;
    }
    
    .solution-detail-container {
        padding: 15px;
    }
    
    .content-section {
        padding: 0 10px;
        margin: 60px 0;
    }
    
    .page-header {
        padding: 40px 20px;
        margin: 20px 0 60px 0;
    }
    
    .page-header h1 {
        font-size: 2.4em;
    }
    
    .page-header .subtitle {
        font-size: 1.1em;
    }
    
    .case-card {
        padding: 24px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .content-section h2 {
        font-size: 1.8em;
    }
    
    .stats-card {
        padding: 32px 20px;
    }
    
    .stats-card .number {
        font-size: 2.8em;
    }
}

@media (max-width: 480px) {
    .solution-detail-container {
        padding: 10px;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
    
    .content-section h2 {
        font-size: 1.6em;
    }
    
    .case-card {
        padding: 20px;
    }
    
    .code-block {
        padding: 16px;
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 选择文本样式 */
::selection {
    background: var(--secondary-color);
    color: white;
}

/* 焦点样式 */
a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* 列表样式优化 */
.content-section ul {
    padding-left: 0;
    list-style: none;
}

.content-section li {
    position: relative;
    padding-left: 24px;
    margin: 12px 0;
    color: var(--text-secondary);
}

.content-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 按钮样式优化 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 16px var(--shadow-light);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-medium);
    color: white;
    text-decoration: none;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeInUp 0.6s ease-out;
}

.case-card {
    animation: fadeInUp 0.6s ease-out;
}

.result-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 联系咨询板块样式 */
.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    margin: 4rem 0 2rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.contact-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-btn {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
}

.contact-btn:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-section {
        padding: 3rem 1rem;
        margin: 3rem 0 1rem 0;
    }
    
    .contact-section h2 {
        font-size: 2rem;
    }
    
    .contact-section p {
        font-size: 1rem;
    }
    
    .contact-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .code-header {
        padding: 0.5rem 0.75rem;
    }
    
    .code-title {
        font-size: 0.8rem;
    }
    
    .code-toggle {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
} 