/* --- 全局与基础样式 --- */
:root {
    --primary-color: #00a8ff; /* 主题亮色 */
    --dark-bg: #1a1a2e;       /* 深色背景 */
    --light-bg: #ffffff;     /* 亮色背景 */
    --dark-card-bg: #16213e;  /* 深色卡片背景 */
    --text-light: #e0e0e0;     /* 亮色文字 */
    --text-dark: #333333;      /* 深色文字 */
    --text-muted: #a0a0a0;     /* 辅助文字 */
    --border-color: #0f3460;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.8;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-flex {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 40px;
}

@media (max-width: 768px) {
    .container-flex {
        flex-direction: column;
    }
}


/* --- 头部英雄区域 --- */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(22, 33, 62, 0.7), rgba(22, 33, 62, 0.7)), url('bridge.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 视差效果 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-bg);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
}


/* --- 内容区域通用样式 --- */
.project-section {
    padding: 6rem 0;
}

.dark-bg {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}
.section-title.left-align {
    text-align: left;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}
.section-title.left-align::after {
     left: 0;
     transform: translateX(0);
}

.section-text {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    text-align: center;
}
.section-text ul {
    list-style-position: inside;
    text-align: left;
    margin-top: 1rem;
}
.section-text li {
    margin-bottom: 0.5rem;
}

/* --- 特定区域样式 --- */
.image-container {
    padding: 2rem;
    background-color: var(--dark-card-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.image-container img, .image-content img {
    max-width: 100%;
    border-radius: 5px;
    display: block;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.detail-card {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.detail-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.container-flex .text-content {
    flex: 1;
    text-align: left;
}

.container-flex .image-content {
    flex: 1;
}

/* --- 技术栈 --- */
.tech-stack {
    text-align: center;
    margin-top: 2rem;
}
.tech-item {
    display: inline-block;
    background-color: #eef1f5;
    color: var(--text-dark);
    padding: 0.5rem 1.5rem;
    margin: 0.5rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.tech-item:hover {
    background-color: var(--primary-color);
    color: var(--light-bg);
}


/* --- 动画效果 --- */
.animate-on-load {
    animation: fadeIn 1s ease-in-out forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 错开动画延迟 */
.detail-card.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.detail-card.animate-on-scroll:nth-child(3) { transition-delay: 0.4s; }
.tech-item.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.tech-item.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.tech-item.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.tech-item.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* --- 页脚 --- */
.footer {
    background-color: var(--dark-bg);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
}

/* ======================================================= */
/* == 新增样式：预测结果可视化 == */
/* ======================================================= */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.result-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    text-align: left;
}

.result-card img {
    width: 100%;
    height: auto;
    background-color: #f0f0f0; /* 图片背景色，防止透明图片不好看 */
}

.result-text {
    padding: 1.5rem;
}

.result-text h3 {
    margin-bottom: 0.75rem;
    color: var(--dark-bg);
}

.result-card:nth-child(2) {
    transition-delay: 0.2s; /* 给第二个卡片增加一点动画延迟 */
}

/* 响应式设计：在小屏幕上，两栏变为单栏 */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}