* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 添加一些视觉装饰元素 */
.dashboard-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c, #f39c12);
    border-radius: 12px 12px 0 0;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
}

/* 添加页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-item {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.dashboard-actions {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 登录页面样式 */
.login-form {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.login-form h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #7f8c8d;
    font-weight: normal;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:hover {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group input[type="submit"] {
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-group input[type="submit"]:hover {
    background-color: #2980b9;
}

/* 配置页面样式 */
.config-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid #3498db;
}

.config-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-header h1 {
    font-size: 28px;
    margin: 0;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.user-info span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.logout-btn {
    background-color: #e74c3c;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(231, 76, 60, 0.6);
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.4);
}

.config-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.config-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
}

.config-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.config-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.config-section {
    margin-bottom: 30px;
}

.config-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
}

.temperature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.temperature-probe {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.temperature-probe:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.temperature-probe h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.temperature-input {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.temperature-input label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
    min-width: 80px;
}

.temperature-input input {
    width: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.temperature-input input:hover {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.temperature-input input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.general-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.general-params .temperature-input {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 10px;
}

/* 首页仪表盘样式 */
.dashboard {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 180px);
    padding: 20px 0;
}

.dashboard-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.dashboard-card h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.dashboard-card p {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* 首页操作按钮区域 */
.dashboard-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 首页统计数据样式 */
.dashboard-stats {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 40px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    min-width: 200px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-item h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.stat-item p {
    margin: 0;
    font-size: 36px;
    font-weight: bold;
    color: white;
}

/* 结果页面样式 */
.result-header {
    background-color: #27ae60;
    color: #fff;
    padding: 20px 0;
    margin-bottom: 30px;
}

/* 顶部信息样式 */
.header-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header-info h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item .label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.info-item .value {
    color: #333;
    font-size: 14px;
}

.result-header h1 {
    text-align: center;
    font-size: 24px;
}

.result-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.chart-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow-x: auto;
}

.table-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
}

.result-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #2c3e50;
}

.result-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-form {
        margin: 50px auto;
        padding: 20px;
    }
    
    .config-form {
        padding: 20px;
    }
    
    .config-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .config-tab {
        text-align: center;
        border-bottom: 1px solid #ddd;
        border-right: none;
    }
    
    .temperature-grid {
        grid-template-columns: 1fr;
    }
    
    .temperature-probe {
        padding: 15px;
    }
    
    .temperature-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .temperature-input input {
        width: 100%;
        margin-left: 0;
    }
    
    .general-params {
        grid-template-columns: 1fr;
    }
    
    .general-params .temperature-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        margin: 0;
    }
    
    .result-table th,
    .result-table td {
        font-size: 12px;
        padding: 8px 5px;
    }
    
    /* 首页响应式设计 */
    .config-header h1 {
        font-size: 22px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
        padding: 8px;
    }
    
    .user-info span {
        font-size: 13px;
    }
    
    .logout-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .dashboard {
        min-height: calc(100vh - 200px);
    }
    
    .dashboard-card {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .dashboard-card h2 {
        font-size: 24px;
    }
    
    .stat-item {
        padding: 20px 30px;
        min-width: 180px;
    }
    
    .stat-item p {
        font-size: 30px;
    }
    
    .dashboard-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary {
        padding: 10px 25px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
}

/* 导航栏样式 */
.navbar {
    background-color: #2c3e50;
    padding: 10px 0;
    margin-bottom: 30px;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.navbar-menu {
    display: flex;
    list-style: none;
}

.navbar-item {
    margin-left: 20px;
}

.navbar-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-link:hover {
    color: #3498db;
}

/* 后台管理页面样式 */
.admin-sidebar {
    background-color: #2c3e50;
    color: #fff;
    width: 250px;
    padding: 20px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
}

.admin-sidebar h2 {
    margin-bottom: 30px;
    font-size: 20px;
}

.admin-menu {
    list-style: none;
}

.admin-menu-item {
    margin-bottom: 10px;
}

.admin-menu-link {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.admin-menu-link:hover,
.admin-menu-link.active {
    background-color: #3498db;
}

.admin-content {
    margin-left: 250px;
    padding: 30px;
}

.admin-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.admin-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-btn:hover {
    background-color: #2980b9;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #2c3e50;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.admin-action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.admin-action-btn.edit {
    background-color: #f39c12;
    color: #fff;
}

.admin-action-btn.delete {
    background-color: #e74c3c;
    color: #fff;
}

.admin-action-btn.approve {
    background-color: #27ae60;
    color: #fff;
}

/* 响应式后台管理 */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 5px;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 5px;
    }
}