/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    overflow: hidden;
}

/* 返回按钮 */
.back-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
}

.back-button:hover {
    color: #293df2;
    transform: translateY(-2px);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.back-button:active {
    transform: translateY(1px);
}

/* 服务标签 */
.service-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.service-tab {
    padding: 12px 30px;
    background: rgba(20, 20, 40, 0.7);
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 180, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    color: white;
}

.service-tab:hover {
    background: rgba(30, 30, 60, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 100, 255, 0.2);
}

.service-tab.active {
    background: rgba(0, 180, 155, 0.3);
    border-color: rgba(0, 180, 155, 0.5);
    box-shadow: 0 0 15px rgba(0, 180, 155, 0.2);
}

.service-tab i {
    font-size: 1.2rem;
    color: white;
}

/* 主容器 */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

header {
    text-align: center;
    padding: 20px 0;
    z-index: 10;
    backdrop-filter: blur(5px);
}

h1 {
    font-size: 1.6rem;
    background: linear-gradient(to right, #ffffff, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* 地球和实时数据容器 */
.main-content {
    display: flex;
    flex: 1;
    position: relative;
    overflow: hidden;
}

#earth-container {
    flex: 3;
    position: relative;
    height: 100%;
    overflow: hidden;
}

#realtime-panel {
    flex: 1;
    min-width: 320px;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    color: white;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h2 {
    font-size: 1.6rem;
    font-weight: 550;
    background: linear-gradient(to right, #00ccff, #00ffcc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.data-section {
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #00ccff;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.data-item {
    background: rgba(30, 40, 60, 0.5);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(100, 180, 255, 0.1);
    transition: all 0.3s ease;
}

.data-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 100, 255, 0.2);
    border-color: rgba(100, 180, 255, 0.3);
}

.data-label {
    font-size: 0.8rem;
    color: #a0d0ff;
    margin-bottom: 5px;
}

.data-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

.data-unit {
    font-size: 0.8rem;
    color: #66aaff;
    margin-left: 3px;
}

.signal-meter {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.signal-level {
    height: 100%;
    background: linear-gradient(to left, #ff5555, #ffcc00, #00ff88);
    border-radius: 4px;
}

.signal-level-1 {
    height: 100%;
    background: linear-gradient(to left, #ff5555, #ffcc00, #00ff88);
    border-radius: 4px;
}

/* 观测站信息 */
#info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 20px;
    border-radius: 15px;
    max-width: 400px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 10;
}

#info-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

#info-panel h2 i {
    font-size: 1.0rem;
}

#service-info {
    font-size: 1.0rem;
    line-height: 1.2;
}

#service-info .city {
    font-size: 1.0rem;
    color: #ffffff;
    margin-bottom: 5px;
}

#service-info .name {
    font-size: 1.0rem;
    color: #ffffff;
    margin-bottom: 10px;
}

#service-info .coords {
    font-size: 1.0rem;
    color: #ffffff;
    opacity: 0.8;
    margin-bottom: 10px;
}

#service-info .systems {
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.system-tag {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 1.0rem;
}

/* 按钮 */
.controls {
    position: absolute;
    bottom: 40px;
    right: 20px;
    flex-direction: column;
    display: flex;
    gap: 5px;
    z-index: 1000;
}

.btn {
    background: none;
    border: none;
    color: #ffffff;
    padding: 12px 25px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
}

.btn:hover {
    color: #293df2;
    transform: translateY(-2px);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.btn:active {
    transform: translateY(1px);
}

.btn i {
    font-size: 1.2rem;
}

/* 热力图示 */
.heatmap-legend {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 218px;
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    z-index: 50;
}

.legend-title {
    font-size: 1.0rem;
    color: white;
    margin-bottom: 8px;
    text-align: center;
}

.legend-gradient {
    height: 20px;
    width: 150px;
    background: linear-gradient(to left, #ff0000, #ffff00, #00ff00);
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.7rem;
    color: white;
    text-align: center;
}

.legend-labels > span {
    flex: 1;
    line-height: 1.4;
}

.legend-range {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* 事件日志样式 */
.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-good {
    color: #00ff88;
}

.log-warning {
    color: #009eff;
}

.log-critical {
    color: #ff5555;
}

.log-icon {
    margin-right: 5px;
    width: 12px;
    text-align: center;
}

/* 模拟控制按钮 */
.sim-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.sim-btn {
    flex: 1;
    padding: 8px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.sim-btn:hover {
    transform: translateY(-2px);
}

#start-sim {
    background: linear-gradient(135deg, #00cc66, #00b359);
    color: white;
}

#stop-sim {
    background: linear-gradient(135deg, #ff4444, #cc3636);
    color: white;
}

.log-container {
    height: 150px;
    overflow-y: auto;
    background: rgba(15, 20, 35, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid rgba(100, 180, 255, 0.1);
}

.log-container-alert {
    height: 300px;
    overflow-y: auto;
    background: rgba(15, 20, 35, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid rgba(100, 180, 255, 0.1);
}

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

.clear-log {
    background: transparent;
    border: none;
    color: #66aaff;
    cursor: pointer;
    font-size: 0.7rem;
}

.clear-log:hover {
    text-decoration: underline;
}

/* 告警样式 */
.alert-container {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
}

.alert-entry {
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 12px;
}

.alert-critical {
    background: rgba(255, 0, 0, 0.2);
    border-left: 3px solid #ff0000;
}

.alert-warning {
    background: rgba(255, 165, 0, 0.2);
    border-left: 3px solid #ffa500;
}

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

.alert-time {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 3px;
}

.alert-type {
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.alert-message {
    color: #fff;
}

.loading-alerts, .no-alerts, .error-alerts {
    text-align: center;
    padding: 20px;
    color: #888;
}

.alert-filter {
    margin-left: 10px;
}

.alert-filter select {
    background-color: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 5px;
}

.refresh-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.refresh-btn:hover {
    color: #4caf50;
}

.rotating {
    animation: rotate 1s linear infinite;
}

/* 汉堡菜单按钮 */
.dropdown {
    position: fixed;
    top: 25px;
    right: 50px;
    z-index: 1000;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 25px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 5px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: center;
}

.hamburger-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 50vh;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 60px 20px 20px;
    margin-top: 50px;
    border-radius: 10px 0 0 10px;
}

.hamburger-menu.active {
    right: 0;
}

.close-hamburger {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 2101;
}

.close-hamburger:hover {
    color: #66aaff;
}

.hamburger-nav-item {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #ffffff;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger-nav-item:hover {
    background: #2e2e38;
    color: #66aaff;
}

.hamburger-nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.hamburger-nav-item a {
    color: #ffffff;
    text-decoration: none;
}

.hamburger-nav-item a:hover,
.hamburger-nav-item button:hover {
    color: #66aaff;
    text-decoration: underline;
}

.hamburger-nav-item button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

.nav {
    display: flex;
    z-index: 2000;
    justify-content: space-between;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 200, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #62F571;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    background: linear-gradient(to right, #F5AB22, #00ffcc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 1300px) {
    body, html {
        overflow-y: auto;
        height: auto;
    }

    .main-content {
        flex-direction: column;
        overflow: visible;
    }

    .container {
        height: auto;
        overflow: visible;
    }

    #earth-container {
        flex: none;
        height: auto;
        min-height: 70vh;
        overflow: visible;
    }

    #realtime-panel {
        min-width: 100%;
        height: 300px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    #info-panel {
        max-width: 220px;
        bottom: 10px;
        left: 10px;
        padding: 10px;
    }

    #info-panel h2 {
        font-size: 1rem;
        margin-bottom: 10px;
        color: #ffffff;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #info-panel h2 i {
        font-size: 0.8rem;
    }

    #service-info {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    #service-info .city {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    #service-info .name {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    #service-info .coords {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    #service-info .systems {
        color: #ffffff;
        display: flex;
        flex-wrap: wrap;
        gap: 0px;
        margin-top: 5px;
    }

    .system-tag {
        padding: 0px 2px;
        border-radius: 20px;
        font-size: 0.8rem;
    }

    .btn {
        font-size: 1.1rem;
    }

    .btn i {
        font-size: 1.1rem;
    }

    #earth-container {
        flex: 5;
    }

    #realtime-panel {
        flex: 1;
    }
}

@media (max-width: 920px) {
    .back-button-container {
        position: relative;
        top: 5px;
        left: 5px;
    }

    .dropdown {
        position: relative;
        top: 10px;
        right: 20px;
    }
    
    h1 {
        font-size: 1.2rem;
        margin-bottom: 0px;
    }
    
    .controls {
        bottom: 10px;
        right: 10px;
    }
    
    .btn {
        font-size: 0.8rem;
    }

    .btn i {
        font-size: 0.8rem;
    }

    #info-panel {
        max-width: 180px;
        bottom: 5px;
        left: 5px;
        padding: 2px;
    }

    #info-panel h2 {
        font-size: 0.8rem;
    }

    #info-panel h2 i {
        font-size: 0.6rem;
    }

    #service-info {
        font-size: 0.6rem;
        line-height: 1.0;
    }

    #service-info .city {
        font-size: 0.6rem;
    }

    #service-info .name {
        font-size: 0.6rem;
    }

    #service-info .coords {
        font-size: 0.6rem;
    }

    .system-tag {
        padding: 0px 2px;
        border-radius: 20px;
        font-size: 0.6rem;
    }

    .back-button {
        font-size: 12px;
    }

    /* 热力图示 */
    .heatmap-legend {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 180px;
        padding: 10px;
    }

    .legend-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .legend-gradient {
        height: 6px;
        width: 120px;
        background: linear-gradient(to left, #ff0000, #ffff00, #00ff00);
    }

    .legend-labels {
        margin-top: 6px;
        font-size: 10px;
    }

    .controls {
        gap: 0px;
    }

    /* 服务标签 */
    .service-tabs {
        gap: 10px;
        margin: 10px 0;
    }

    .service-tab {
        padding: 10px 20px;
        font-size: 14px;
        gap: 10px;
    }

    .service-tab i {
        font-size: 14px;
    }
}

