/* 通用样式 */
* {
    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);
}

/* 主容器 */
.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;
}

.satellite-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.satellite-item {
    background: rgba(40, 100, 180, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-good {
    background: #00ff88;
}

.status-warning {
    background: #ffcc00;
}

.status-critical {
    background: #ff5555;
}

.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 right, #ff5555, #ffcc00, #00ff88);
    border-radius: 4px;
}

.signal-level-1 {
    height: 100%;
    background: linear-gradient(to right, #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;
}

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

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

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

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

#station-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: 30px;
    right: 20px;
    display: flex;
    gap: 15px;
    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;
}

/* 事件日志样式 */
.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);
    }
}

@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;
    }

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

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

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

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

    #station-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;
    }

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

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

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

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

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

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

