/* 蓝白风格 CSS */

/* 动画定义: 按钮按下时的水波纹效果 */
@keyframes ripple {
    0% { box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.4); }
    100% { box-shadow: 0 0 0 10px rgba(30, 136, 229, 0); }
}

/* 颜色变量 */
:root {
    --primary-blue: #1e88e5; /* 核心蓝 */
    --secondary-blue: #42a5f5; /* 辅助蓝 */
    --background-light: #ffffff; /* 主背景白 */
    --section-bg: #f5f5f5; /* 分隔区浅灰 */
    --text-dark: #333333;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
    --font-family: 'Roboto', 'Helvetica Neue', sans-serif; /* 商务字体 */
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: var(--background-light);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 20px;
}
.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1em;
    margin-bottom: 50px;
}

/* --- 导航栏 --- */
header {
    background-color: var(--background-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-blue);
    text-decoration: none;
    letter-spacing: 1px;
}
nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 30px;
    position: relative;
    padding: 5px 0;
    font-weight: 500;
}
nav a:hover {
    color: var(--primary-blue);
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-blue);
    transform: translateX(-50%);
    transition: width 0.3s ease-out;
}
nav a:hover::after {
    width: 100%;
}

/* --- 首页 (Hero) --- */
#hero {
    height: 75vh;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
#hero h1 {
    font-size: 3.5em;
    color: white;
    margin-bottom: 15px;
    font-weight: 900;
}
#hero p {
    font-size: 1.3em;
    color: #e0e0e0;
    margin-bottom: 30px;
}

/* --- CTA 按钮 --- */
.cta-button {
    background: var(--background-light);
    color: var(--primary-blue);
    font-weight: bold;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid var(--background-light);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    text-transform: none;
    display: inline-block; /* 确保它能响应鼠标事件和定位 */
}
.cta-button:hover {
    background: var(--secondary-blue);
    color: white;
    box-shadow: 0 6px 15px rgba(30, 136, 229, 0.4);
    transform: scale(1.02);
    animation: ripple 0.5s ease-out;
}

/* --- 核心服务卡片 --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.service-card {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.service-card:hover {
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.2);
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}
.service-card h3 {
    color: var(--text-dark);
    margin-top: 0;
    font-weight: 600;
}
.icon-hologram {
    font-size: 2.5em;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

/* --- 技术栈滚动条 --- */
#tech-stack {
    padding: 40px 0;
    background-color: var(--section-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.tech-ticker {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.tech-ticker-inner {
    display: inline-block;
    animation: ticker-scroll 30s linear infinite;
    padding-right: 50px;
    /* 确保内容足够长以实现滚动效果 */
    width: 200%;
}
.tech-tag {
    display: inline-block;
    background-color: var(--background-light);
    border: 1px solid var(--secondary-blue);
    color: var(--primary-blue);
    padding: 8px 18px;
    margin-right: 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- 定制流程 --- */
#customization-process .process-steps {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    text-align: center;
    flex-wrap: wrap;
}
#customization-process .step-item {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: var(--background-light);
}
#customization-process .step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(30, 136, 229, 0.15);
}
#customization-process .step-item h4 {
    color: var(--primary-blue);
    font-size: 1.2em;
    margin: 15px 0 10px;
}
#customization-process .step-item p {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* --- [云平台预览] 仪表盘布局 --- */
#cloud-preview {
    background-color: var(--section-bg);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 30px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-left: 5px solid var(--secondary-blue);
}

.stat-card h4 {
    color: var(--text-muted);
    font-size: 1em;
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
}

/* --- [云平台预览] 图表样式 --- */
.chart-area {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-height: 400px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.chart-placeholder {
    display: none; /* 隐藏文字占位符 */
}

.chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-line-temp {
    stroke: var(--primary-blue); /* 核心蓝用于温度 */
    stroke-width: 3;
    fill: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.chart-line-humid {
    stroke: #ff9800; /* 橙色用于湿度对比 */
    stroke-width: 3;
    fill: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- [云平台预览] 日志面板样式 --- */
.log-feed-container {
    grid-column: 1 / -1;
    margin-top: -10px;
}
.log-feed {
    background-color: #e3f2fd; /* 浅蓝背景 */
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 15px;
    height: 150px;
    overflow-y: scroll;
    font-size: 0.9em;
    font-family: monospace;
}
.log-item {
    padding: 2px 0;
    border-bottom: 1px dotted #bbdefb;
}
.log-item.alarm {
    color: #d32f2f; /* 红色：报警 */
    font-weight: bold;
}
.log-item.warn {
    color: #ffb300; /* 橙色：警告 */
}
.log-item.info {
    color: var(--primary-blue); /* 蓝色：信息 */
}


/* --- 联系表单 --- */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    background-color: var(--background-light);
    border: 1px solid #ccc;
    border-radius: 5px;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px rgba(30, 136, 229, 0.5);
    outline: none;
}
.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}
.contact-form button.cta-button {
    background: var(--primary-blue);
    color: white;
    border: none;
}
.contact-form button.cta-button:hover {
    background: var(--secondary-blue);
}


/* --- 底部 --- */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 25px 0;
    border-top: none;
}

/* --- 响应式设计 --- */
@media (max-width: 992px) {
    /* 平板电脑及以下 */
    .service-grid {
        grid-template-columns: repeat(2, 1fr); /* 服务卡片变为两列 */
    }
    .process-steps {
        flex-direction: column;
    }
    .process-steps .step-item {
        max-width: 100%;
        margin-bottom: 20px;
    }
    nav {
        flex-direction: column; /* 导航栏垂直堆叠 */
        align-items: flex-start;
        padding: 15px 20px;
    }
    nav a {
        margin-left: 0;
        margin-right: 20px;
    }
    nav div {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
    }
}
@media (max-width: 768px) {
    /* 手机及更小设备 */
    #hero {
        height: 60vh;
    }
    #hero h1 {
        font-size: 2em;
    }
    section {
        padding: 60px 0; /* 缩小垂直间距 */
    }
    .service-grid {
        grid-template-columns: 1fr; /* 服务卡片变为单列 */
    }
    .dashboard-stats {
        grid-template-columns: 1fr; /* 数据卡片变为单列 */
    }
    .tech-ticker-inner {
        /* 移动端减慢滚动速度，避免动画过于突兀 */
        animation: ticker-scroll 40s linear infinite;
    }

}
/* 在style.css的媒体查询中补充 */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr; /* 小屏幕数据卡片单列显示 */
    }
    .service-grid {
        grid-template-columns: 1fr; /* 服务卡片单列堆叠 */
    }
    #hero h1 {
        font-size: 2.5em; /* 缩小标题避免溢出 */
    }
}
.stat-card, .service-card {
    transition: all 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(30, 136, 229, 0.1);
}