/* 航天风格 - 历史上的今天 (手机优化版) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    color: #fff;
    position: relative;
    overflow-x: hidden;
    background: #0a0f1a;
}

/* 星空背景动画 - 简化版提升性能 */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1a2535 0%, #0a0f1a 100%);
    z-index: -2;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMiIgaGVpZ2h0PSIyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjEiIGN5PSIxIiByPSIxIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC44Ii8+PC9zdmc+') repeat;
    animation: starsAnimation 200s linear infinite;
    opacity: 0.3;
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNCIgaGVpZ2h0PSI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjIiIGN5PSIyIiByPSIxIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC4zIi8+PC9zdmc+') repeat;
    animation: twinklingAnimation 4s ease-in-out infinite;
}

@keyframes starsAnimation {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

@keyframes twinklingAnimation {
    0% { opacity: 0.2; }
    50% { opacity: 0.8; }
    100% { opacity: 0.2; }
}

/* 主容器 */
.space-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px 30px 15px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 - 固定 */
.space-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding: 8px 15px;
    box-shadow: 0 2px 20px rgba(0, 255, 255, 0.1);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planet {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px #00ffff);
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 500;
    background: linear-gradient(135deg, #fff, #aaddff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.date-display {
    background: rgba(0, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.current-date {
    font-size: 1rem;
    color: #00ffff;
    font-weight: 500;
}

/* 任务标题 */
.mission-title {
    text-align: center;
    margin: 80px 0 20px 0;
    position: relative;
}

.mission-title h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.mission-code {
    font-size: 0.9rem;
    color: #aaddff;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-left: 8px;
}

.orbit-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, #aaddff, #00ffff, transparent);
    margin-top: 10px;
}

/* 时间线布局 */
.timeline {
    position: relative;
    padding: 5px 0;
    flex: 1;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #00ffff, #aaddff, #00ffff);
    opacity: 0.3;
}

/* 事件卡片 */
.event-card {
    display: flex;
    margin-bottom: 20px;
    position: relative;
    background: rgba(20, 30, 45, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    animation: cardAppear 0.3s ease-out;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card:active {
    transform: scale(0.98);
    background: rgba(30, 40, 55, 0.8);
    border-color: #00ffff;
}

.event-year {
    min-width: 80px;
    text-align: center;
}

.year-number {
    font-size: 2rem;
    font-weight: 600;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    display: block;
    line-height: 1;
}

.event-content {
    flex: 1;
    padding-left: 15px;
}

.event-title {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 5px;
    color: #fff;
}

.space-highlight {
    color: #00ffff;
    font-weight: 500;
    text-shadow: 0 0 5px #00ffff;
    background: rgba(0, 255, 255, 0.1);
    padding: 0 2px;
    border-radius: 3px;
}

.event-meta {
    display: flex;
    gap: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.event-source {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 空状态 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    color: #fff;
}

.satellite {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 2px solid #00ffff;
    border-radius: 50%;
    position: relative;
    animation: satelliteOrbit 2s ease-in-out infinite;
}

.satellite::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #00ffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px #00ffff;
}

@keyframes satelliteOrbit {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

/* 底部状态栏 */
.space-footer {
    margin-top: 30px;
    background: rgba(10, 20, 30, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.status-item {
    flex: 1;
    text-align: center;
    padding: 8px 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.status-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.status-value {
    display: block;
    color: #00ffff;
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-word;
}

.copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 控制面板 */
.control-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 900;
}

.panel-btn {
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.2);
    font-weight: 500;
}

.panel-btn:active {
    background: #00ffff;
    color: #000;
    transform: scale(0.95);
}

.panel-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 微信内优化 */
.wechat .space-header {
    padding-top: env(safe-area-inset-top);
}

.wechat .space-container {
    padding-bottom: env(safe-area-inset-bottom);
}