/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #4caf50, #2d7d47);
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(-15deg);
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.header-text {
    flex: 1;
}

.page-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title i {
    font-size: 2.8rem;
    opacity: 0.9;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.6;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 25px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.5));
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-suffix {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 2px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

/* 主要内容区 */
.main-section {
    padding: 60px 0;
    background: #f8fffe;
}

.content-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

/* 面板卡片通用样式 */
.panel-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e8f5e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
}

.card-header h3 {
    font-size: 1.3rem;
    color: #2d7d47;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.card-body {
    padding: 30px;
}

/* 表单样式 */
.planting-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.form-group select,
.form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.export-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

/* 结果展示 */
.result-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-item {
    padding: 20px;
    background: #f8fff8;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
}

.result-item h4 {
    color: #2d7d47;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.result-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 地图样式 */
.map-card {
    min-height: 500px;
}

.map-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn.active,
.control-btn:hover {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.map-container {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-radius: 10px;
    overflow: hidden;
}

.china-map {
    position: relative;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><path d="M100 100 L200 80 L300 120 L400 100 L500 140 L600 120 L700 160 L650 250 L600 350 L500 400 L400 420 L300 380 L200 360 L150 280 Z" fill="none" stroke="%23ddd" stroke-width="2"/></svg>') center center no-repeat;
    background-size: contain;
}

.region-item {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

.region-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.region-item.high-risk .region-marker {
    background: #f44336;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.6);
}

.region-item.medium-risk .region-marker {
    background: #ff9800;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
}

.region-item.low-risk .region-marker {
    background: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

.region-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.region-item:hover .region-label {
    opacity: 1;
}

.risk-level {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.region-item.high-risk .risk-level {
    color: #f44336;
}

.region-item.medium-risk .risk-level {
    color: #ff9800;
}

.region-item.low-risk .risk-level {
    color: #4caf50;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.high-risk {
    background: #f44336;
}

.legend-color.medium-risk {
    background: #ff9800;
}

.legend-color.low-risk {
    background: #4caf50;
}

.legend-text {
    font-size: 0.9rem;
    color: #333;
}

/* 图表样式 */
.chart-card {
    min-height: 350px;
}

.chart-controls select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.chart-controls select:focus {
    outline: none;
    border-color: #4caf50;
}

/* 预警通知区 */
.alerts-section {
    padding: 60px 0;
    background: white;
}

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

.alerts-header h2 {
    color: #2d7d47;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.voice-toggle {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.voice-toggle.active {
    background: linear-gradient(135deg, #f44336, #e53935);
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.alert-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.alert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    transition: all 0.3s ease;
}

.alert-card.urgent::before {
    background: #f44336;
}

.alert-card.warning::before {
    background: #ff9800;
}

.alert-card.info::before {
    background: #2196f3;
}

.alert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.alert-card.urgent .alert-icon {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.alert-card.warning .alert-icon {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.alert-card.info .alert-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.alert-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.alert-time {
    font-size: 0.8rem;
    color: #999;
}

.alert-actions {
    display: flex;
    align-items: flex-end;
}

.action-btn {
    background: transparent;
    color: #4caf50;
    border: 2px solid #4caf50;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #4caf50;
    color: white;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    color: #2d7d47;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #45a049;
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .header-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .page-title {
        font-size: 2rem;
        justify-content: center;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .alerts-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .alerts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .alert-card {
        padding: 20px;
    }

    .map-container {
        height: 300px;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 30px 0;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .header-stats .stat-item {
        min-width: 100px;
        padding: 15px;
    }

    .card-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .card-body {
        padding: 20px;
    }

    .map-container {
        height: 250px;
    }

    .region-item {
        transform: scale(0.8);
    }

    .alert-card {
        flex-direction: column;
        gap: 15px;
    }

    .alert-actions {
        align-items: flex-start;
    }
} 