:root {
    --primary-color: #2E75B5;
    --secondary-color: #8FAADC;
    --accent-color: #FF6B6B;
    --warning-color: #F39C12;
    --danger-color: #e0a118;
    --success-color: #27AE60;
    --light-bg: #F5F9FF;
    --dark-text: #2C3E50;
    --light-text: #7F8C8D;
    --border-color: #DDE6ED;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(30deg);
}

.header-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    flex-shrink: 0;
    min-width: 200px;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.subtitle input[type="number"] {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.subtitle input[type="number"]::-webkit-inner-spin-button,
.subtitle input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.subtitle input[type="number"] {
    -moz-appearance: textfield;
}

.subtitle button {
    margin-left: 10px;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subtitle button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 坐标输入组样式 */
.coordinate-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.coordinate-mode {
    display: none;
    align-items: center;
    gap: 5px;
}

.coordinate-mode.active {
    display: flex;
}

.degree-minute-input {
    display: flex;
    align-items: center;
    gap: 2px;
}

.degree-minute-input input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.coordinate-toggle-btn {
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.coordinate-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 控制区域样式 */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* 预警区域标题样式 */
.warning-section {
    position: relative;
}

.warning-section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}


.warning-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex: 1;
}

.warning-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--warning-color);
    display: flex;
    flex-direction: column;
    max-height: 300px;
}

.warning-card.wind-warning {
    border-left-color: #c99423;
}

.warning-card.wave-warning {
    border-left-color: #2980B9;
}

.warning-card.visibility-warning {
    border-left-color: #7F8C8D;
}



.warning-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--warning-color), var(--secondary-color));
}

.warning-card.wind-warning::before {
    background: linear-gradient(90deg,  #c99423, #e2b452);
}

.warning-card.wave-warning::before {
    background: linear-gradient(90deg, #2980B9, #3498DB);
}

.warning-card.visibility-warning::before {
    background: linear-gradient(90deg, #7F8C8D, #BDC3C7);
}

.warning-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.warning-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.wind-warning .warning-icon {
    background: var(--danger-color);
}

.wave-warning .warning-icon {
    background: #2980B9;
}

.visibility-warning .warning-icon {
    background: #7F8C8D;
}

.warning-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

.warning-content {
    flex: 1;
    overflow-y: auto;
    min-height: 60px;
    padding-right: 5px;
}

.warning-content::-webkit-scrollbar {
    width: 6px;
}

.warning-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.warning-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.warning-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.warning-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: var(--light-bg);
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 3px solid var(--warning-color);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.wind-warning .warning-item {
    border-left-color: var(--danger-color);
}

.wave-warning .warning-item {
    border-left-color: #2980B9;
}

.visibility-warning .warning-item {
    border-left-color: #7F8C8D;
}

.warning-level {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.wind-warning .warning-level {
    background-color: #FFE6E6;
    color: var(--danger-color);
}

.wave-warning .warning-level {
    background-color: #E6F3FF;
    color: #2980B9;
}

.visibility-warning .warning-level {
    background-color: #F2F2F2;
    color: #7F8C8D;
}

.no-warning {
    color: var(--light-text);
    font-style: italic;
    text-align: center;
    padding: 15px 0;
}

.controls-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(46, 117, 181, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: #1c5a9b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 117, 181, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-map {
    background: #17A2B8;
    box-shadow: 0 4px 10px rgba(23, 162, 184, 0.3);
}

.btn-map:hover {
    background: #138496;
    box-shadow: 0 6px 15px rgba(23, 162, 184, 0.4);
}

.btn-refresh {
    background: var(--success-color);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

.btn-refresh:hover {
    background: #219653;
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.4);
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.wind-card::before {
    background: linear-gradient(90deg, var(--primary-color), #2E75B5);
}

.wave-card::before {
    background: linear-gradient(90deg, var(--success-color), #1ABC9C);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wave-card .card-title {
    color: var(--success-color);
}

.card-title i {
    font-size: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--light-bg);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.chart-container {
    height: 320px;
    position: relative;
    transition: all 0.3s ease;
}

.chart-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: white;
    padding: 20px;
}

/* 表格容器样式 */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    /* 增强滚动条可见性 */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* 表格滚动条容器 */
.table-scroll-container {
    position: relative;
    width: 100%;
}

/* 固定滚动条 */
.table-scrollbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    height: 8px;
    background: #f1f1f1;
    border-radius: 10px;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-scrollbar-thumb {
    position: absolute;
    height: 100%;
    background: #c1c1c1;
    border-radius: 10px;
    cursor: grab;
    transition: background-color 0.3s ease;
}

.table-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 当表格需要滚动时显示滚动条 */
.table-wrapper.scrolling .table-scrollbar {
    display: block;
}

/* Webkit浏览器滚动条样式 */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1800px;
}

/* ... 前面的代码保持不变 ... */

.data-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
}

/* 为表头单元格添加短竖线分隔符 */


/* 为第一行表头的特殊列添加更明显的分隔 */
.data-table tr:first-child th:nth-child(2)::before,  /* 风列开始 */
.data-table tr:first-child th:nth-child(5)::before,  /* 海浪列开始 */
.data-table tr:first-child th:nth-child(8)::before,  /* 涌浪列开始 */
.data-table tr:first-child th:nth-child(11)::before, /* 最大波高列开始 */
.data-table tr:first-child th:nth-child(12)::before, /* 天气列开始 */
.data-table tr:first-child th:nth-child(13)::before, /* 能见度列开始 */
.data-table tr:first-child th:nth-child(14)::before  /* 气温列开始 */
{
    background-color: rgba(255, 255, 255, 0.8);
    height: 50%;
    top: 25%;
}

/* 为第二行表头添加短竖线 */
.data-table tr:nth-child(2) th:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.5);
}

/* 确保克隆表头也与原始表头样式一致 */
.table-header-clone th {
    position: relative;
}


.table-header-clone tr:first-child th:nth-child(2)::before,
.table-header-clone tr:first-child th:nth-child(5)::before,
.table-header-clone tr:first-child th:nth-child(8)::before,
.table-header-clone tr:first-child th:nth-child(11)::before,
.table-header-clone tr:first-child th:nth-child(12)::before,
.table-header-clone tr:first-child th:nth-child(13)::before,
.table-header-clone tr:first-child th:nth-child(14)::before {
    background-color: rgba(255, 255, 255, 0.8);
    height: 50%;
    top: 25%;
}

.table-header-clone tr:nth-child(2) th:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.5);
}

/* ... 后面的代码保持不变 ... */

/* 固定表头样式 */
.table-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 克隆的固定表头 */
.table-header-clone {
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    display: none;
    border-collapse: collapse;
    table-layout: fixed;
    width: auto;
}

.table-header-clone.visible {
    display: table;
}

/* 确保克隆表头与原始表头样式完全一致 */
.table-header-clone th {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    box-sizing: border-box;
}

.data-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.data-table tr:nth-child(even) {
    background-color: var(--light-bg);
}

.data-table tr:hover {
    background-color: #e6f0ff;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 40px 0 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.3rem;
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(46, 117, 181, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.stat-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 8px;
}

.stat-badge.high {
    background-color: #FFE6E6;
    color: var(--danger-color);
}

.stat-badge.medium {
    background-color: #FFF4E6;
    color: var(--warning-color);
}

.stat-badge.low {
    background-color: #E8F6F3;
    color: var(--success-color);
}

.weather-icon {
    font-size: 1.4rem;
    vertical-align: middle;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: var(--light-text);
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .controls-container {
        flex-direction: column;
    }
    
    .warning-cards {
        grid-template-columns: 1fr;
    }
    
    .controls-right {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .warning-card {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    /* 移动端表格样式调整 */
    .table-wrapper {
        border-radius: 10px;
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .table-header-clone th {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-center {
        order: 1;
    }
    
    .header-right {
        order: 2;
        justify-content: center;
        width: 100%;
    }
    
    /* 移动端坐标输入组优化 */
    .coordinate-input-group {
        justify-content: center;
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .coordinate-mode {
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .degree-minute-input {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .subtitle input[type="number"] {
        width: 70px;
        font-size: 0.9rem;
        margin: 2px;
    }
    
    .degree-minute-input input[type="number"] {
        width: 55px;
        font-size: 0.85rem;
        margin: 1px;
    }
    
    .coordinate-toggle-btn {
        font-size: 0.85rem;
        padding: 6px 10px;
        margin-top: 5px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { 
        transform: translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

.wind-card {
    animation-delay: 0.1s;
}

.wave-card {
    animation-delay: 0.2s;
}

.warning-card {
    animation: fadeIn 0.5s ease-out;
}

.warning-card.wind-warning {
    animation-delay: 0.3s;
}

.warning-card.wave-warning {
    animation-delay: 0.4s;
}

.warning-card.visibility-warning {
    animation-delay: 0.5s;
}

/* 多层阴影脉动效果 */
.warning-card.has-warning {
    animation: multi-shadow-pulse 2s ease-in-out infinite;
}

@keyframes multi-shadow-pulse {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.12),
            0 0 0 rgba(231, 76, 60, 0);
    }
    50% {
        box-shadow: 
            0 12px 30px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(231, 76, 60, 0.3),
            0 0 40px rgba(231, 76, 60, 0.1);
    }
}

.wave-warning.has-warning {
    animation: multi-shadow-pulse-wave 2s ease-in-out infinite;
}

@keyframes multi-shadow-pulse-wave {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.12),
            0 0 0 rgba(41, 128, 185, 0);
    }
    50% {
        box-shadow: 
            0 12px 30px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(41, 128, 185, 0.3),
            0 0 40px rgba(41, 128, 185, 0.1);
    }
}

/* 工具提示样式 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip.show {
    opacity: 1;
}

/* 日期分隔行样式 */
.date-separator {
    background-color: #f0f8ff !important;
}

.date-separator td {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-align: center;
    padding: 12px !important;
    border-bottom: 2px solid var(--primary-color);
    border-top: 2px solid var(--primary-color);
}

/* 确保日期行不会被交替行颜色覆盖 */
.date-separator:nth-child(even),
.date-separator:nth-child(odd) {
    background-color: #f0f8ff !important;
}

/* 日期行后面的第一行特殊样式 */
.date-separator + tr {
    border-top: 2px solid var(--primary-color);
}

/* 旋转动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: rotate 1s linear infinite;
}


/* 下载动画 */
@keyframes downloadPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.downloading {
    animation: downloadPulse 0.5s ease;
    background-color: var(--success-color) !important;
    color: white !important;
}

/* 跑马灯容器样式 - 绝对定位居中 */
.marquee-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    height: 30px;
    min-width: 400px;
    max-width: 600px;
    /* 彻底清除所有样式 */
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marquee-text {
    white-space: nowrap;
    animation: marquee 15s linear infinite;
    font-weight: 600;
    font-size: 1.1rem;
    color: #e74c3c;
    display: inline-block;
    padding: 0;
    line-height: 1.2;
    /* 确保文字没有背景 */
    background: none !important;
}

/* 确保没有任何伪元素 */
.marquee-container::before,
.marquee-container::after,
.marquee-text::before,
.marquee-text::after {
    content: none !important;
    display: none !important;
}

/* 预警类型文字颜色 */
.marquee-text.wind-warning {
    color: #e74c3c;
}

.marquee-text.wave-warning {
    color: #2980b9;
}

.marquee-text.visibility-warning {
    color: #7f8c8d;
}

.marquee-text.multiple-warning {
    color: #9b59b6;
}

.marquee-text.no-warning {
    color: #27ae60;
}

.marquee-text.loading {
    color: #f39c12;
}

.marquee-text.error {
    color: #c0392b;
}

/* 跑马灯动画 */
@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .warning-section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .marquee-container {
        position: relative;
        left: auto;
        transform: none;
        min-width: 300px;
        max-width: 100%;
        height: 25px;
        margin-top: 10px;
        justify-content: flex-start;
    }
    
    .marquee-text {
        font-size: 1rem;
        animation: marquee 12s linear infinite;
    }
}

@media (max-width: 480px) {
    .marquee-container {
        min-width: 250px;
        height: 22px;
    }
    
    .marquee-text {
        font-size: 0.9rem;
    }
    
    /* 超小屏幕坐标输入优化 */
    .coordinate-input-group {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .coordinate-mode {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .degree-minute-input {
        justify-content: center;
        gap: 2px;
    }
    
    .subtitle input[type="number"] {
        width: 60px;
        font-size: 0.85rem;
        padding: 3px 5px;
    }
    
    .degree-minute-input input[type="number"] {
        width: 45px;
        font-size: 0.8rem;
        padding: 2px 4px;
    }
    
    .coordinate-toggle-btn {
        font-size: 0.8rem;
        padding: 4px 8px;
        margin-top: 3px;
    }
    
    .subtitle {
        font-size: 1rem;
        gap: 8px;
    }
}

/* 地图弹出卡片样式 */
.map-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.map-modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 1001;
}





.map-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    color: #333;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    border: none;
    z-index: 1002;
}

.map-close-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}



.map-container {
    height: 550px;
    width: 100%;
    position: relative;
    z-index: 1;
    border-radius: 15px;
}

/* 地图网格样式 */
.leaflet-grid-line {
    stroke: #666;
    stroke-opacity: 0.3;
    stroke-dasharray: 5, 5;
    stroke-width: 1;
    fill: none;
}

.leaflet-grid-label {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #666 !important;
    border-radius: 3px !important;
    padding: 2px 5px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #333 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-align: center !important;
    min-width: 35px !important;
}

/* 地图点击标记样式 */
.leaflet-marker-custom {
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: grab;
    animation: pulse-marker 2s infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leaflet-marker-custom:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(46, 117, 181, 0.4);
}

/* Leaflet拖动状态样式 */
.leaflet-marker-dragging {
    cursor: grabbing !important;
    transform: scale(1.2);
    box-shadow: 0 6px 16px rgba(46, 117, 181, 0.5);
}

@keyframes pulse-marker {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 2px 15px rgba(46, 117, 181, 0.6);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* 地图弹窗样式 */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.leaflet-popup-tip {
    background: white;
}

/* 动画效果 */
@keyframes slideUp {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .map-modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
    }
    
    .map-container {
        height: 450px;
    }
    

    
    .map-modal-header {
        padding: 15px 20px;
    }
    
    .map-modal-header h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .map-container {
        height: 350px;
    }
    
    .map-coordinates {
        font-size: 0.8rem;
    }
}

/* 添加分隔线 */
.warning-section::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 20px 0 18px 0;
}