/* public/assets/css/science/earthquake.css */
:root {
    --primary: #ef4444; /* 灾害红 */
    --primary-hover: #dc2626; 
    --primary-light: #fee2e2;
    --bg: #f8fafc; --card: #ffffff; --card-alt: #f1f5f9;
    --text-main: #0f172a; --text-sub: #64748b;
    --border: #e2e8f0; --shadow: 0 20px 40px -15px rgba(0,0,0,0.08);
    
    /* 震级颜色映射 */
    --mag-minor: #3b82f6; /* 蓝 M3-4 */
    --mag-notable: #10b981; /* 绿 M4-5 */
    --mag-moderate: #f59e0b; /* 橙 M5-6 */
    --mag-strong: #ef4444; /* 红 M6+ */
    --mag-major: #991b1b; /* 暗红 M7+ */
}

[data-theme="dark"]:root { 
    --bg: #020617; --card: #0f172a; --card-alt: #1e293b;
    --text-main: #f8fafc; --text-sub: #94a3b8; --border: #334155; 
    --shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
    --primary-light: rgba(239,68,68,0.15);
}

.seo-tool-wrapper { 
    width: 100%; max-width: 900px; margin: 0 auto;
    background: var(--bg); border-radius: 20px; overflow: hidden; 
    border: 1px solid var(--border); box-shadow: var(--shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text-main);
}

.tool-seo-header { 
    padding: 50px 20px 40px 20px; text-align: center; 
    border-bottom: 1px solid var(--border); 
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%); 
}
.header-icon-wrapper {
    width: 60px; height: 60px; background: white; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--primary); margin: 0 auto 20px auto;
    box-shadow: 0 10px 20px rgba(239,68,68,0.2); border: 1px solid var(--primary-light);
}
[data-theme="dark"] .header-icon-wrapper { background: var(--card); border-color: var(--border); }

.tool-h1 { margin: 0 0 15px 0; font-size: 1.8rem; font-weight: 900; color: var(--text-main); letter-spacing: -0.5px;}
.tool-description { margin: 0 auto; max-width: 700px; font-size: 0.95rem; color: var(--text-sub); line-height: 1.6; }

.tool-workspace { padding: 40px 30px; display: flex; flex-direction: column; gap: 30px;}

/* 雷达控制面板 */
.radar-panel { width: 100%; }
.radar-box { background: var(--card); border-radius: 20px; padding: 25px; box-shadow: 0 15px 30px -10px rgba(0,0,0,0.05); border: 1px solid var(--border); }

.filter-controls { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 200px;}
.filter-group label { font-size: 13px; font-weight: 800; color: var(--text-sub); text-transform: uppercase; white-space: nowrap;}
.styled-select { 
    width: 100%; padding: 14px 16px; font-size: 15px; font-weight: 700; border-radius: 12px; 
    border: 2px solid var(--border); background: var(--card-alt); color: var(--text-main); 
    outline: none; cursor: pointer; transition: 0.2s; 
    -webkit-appearance: none; appearance: none; 
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); 
    background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em;
}
.styled-select:focus { border-color: var(--primary); background: var(--card);}

.btn-scan { 
    height: 52px; padding: 0 24px; border-radius: 12px; border: none; 
    background: var(--primary); color: white; font-size: 16px; font-weight: 800; 
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 8px 15px rgba(239,68,68,0.3); transition: 0.2s; flex-shrink: 0; min-width: 120px;
}
.btn-scan:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(239,68,68,0.4); }

/* 数据大屏区 */
.seismic-board { background: var(--card); border-radius: 20px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid var(--border); min-height: 400px;}
.board-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px dashed var(--border);}
.board-title { margin: 0; font-size: 18px; font-weight: 900; color: var(--text-main); }
.board-title i { color: var(--primary); margin-right: 8px;}
.count-badge { font-size: 13px; font-weight: 900; color: var(--primary); background: var(--primary-light); padding: 4px 12px; border-radius: 12px; }

.state-display { text-align: center; color: var(--text-sub); font-size: 15px; padding: 80px 20px; font-weight: bold;}

/* 雷达扫描动画 */
.radar-spinner {
    width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--primary-light);
    border-top-color: var(--primary); margin: 0 auto 20px auto; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 震级列表卡片 */
.events-list { display: flex; flex-direction: column; gap: 15px; }
.event-card { 
    border: 1px solid var(--border); border-radius: 16px; padding: 20px; 
    display: flex; align-items: center; gap: 20px; background: var(--card-alt); 
    transition: 0.2s; min-width: 0; position: relative; overflow: hidden;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); background: var(--card); border-color: #94a3b8;}

/* 根据震级变化的动态彩色块 */
.mag-box { 
    width: 65px; height: 65px; border-radius: 16px; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; color: white; flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); position: relative;
}
.mag-value { font-size: 24px; font-weight: 900; font-family: 'Consolas', monospace; line-height: 1.1; letter-spacing: -1px;}
.mag-label { font-size: 10px; font-weight: bold; text-transform: uppercase; opacity: 0.9;}

/* 强震脉冲动画 */
.mag-box.pulse-alert::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 16px; background: inherit; z-index: -1; animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(1.5); opacity: 0; } }

.event-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px;}
.event-place { font-size: 16px; font-weight: 900; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-meta { font-size: 13px; font-weight: bold; color: var(--text-sub); display: flex; gap: 15px; flex-wrap: wrap;}
.event-meta span { display: flex; align-items: center; gap: 5px; }

/* 海啸警报徽章 */
.tsunami-badge { 
    background: #2563eb; color: white; padding: 4px 10px; border-radius: 8px; 
    font-size: 11px; font-weight: 900; display: inline-flex; align-items: center; gap: 5px; 
    text-transform: uppercase; animation: flash 1s infinite alternate;
}
@keyframes flash { from { opacity: 1; } to { opacity: 0.6; } }

.event-link { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 14px; transition: 0.2s; flex-shrink: 0;}
.event-link:hover { background: var(--primary); color: white; border-color: var(--primary);}

.seo-article-content { padding: 50px 40px; background: var(--card); border-top: 1px solid var(--border); color: var(--text-main); line-height: 1.8; }
.seo-article-content h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 25px; }
.seo-article-content h3 { font-size: 1.2rem; font-weight: 800; margin: 30px 0 15px 0; }
.seo-article-content ul { padding-left: 20px; }
.seo-article-content li { margin-bottom: 10px; color: var(--text-sub);}
.seo-article-content p { color: var(--text-sub); }

@media (max-width: 650px) {
    .tool-workspace { padding: 20px 15px; gap: 20px;}
    .radar-box { padding: 20px;}
    .filter-controls { flex-direction: column; align-items: stretch;}
    .filter-group { width: 100%; min-width: 100%;}
    .btn-scan { width: 100%; }
    
    .event-card { flex-direction: column; align-items: flex-start; gap: 15px; position: relative;}
    .event-info { width: 100%; }
    .event-place { white-space: normal; }
    .event-link { position: absolute; top: 20px; right: 20px; }
    
    .seo-article-content { padding: 30px 20px; }
}