* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    font-size: 13px;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 1;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(0, 5, 17, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #4a9eff;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar .nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.navbar .nav-links a:hover {
    color: #4a9eff;
}

.nav-search {
    position: relative;
    flex: 1;
    max-width: 280px;
    margin: 0 20px;
}

.nav-search input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    background: rgba(13, 18, 36, 0.9);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 20px;
    color: #e0e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search input::placeholder {
    color: #6b7d8e;
}

.nav-search input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

.nav-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(74, 158, 255, 0.15);
    color: #7aa8d4;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.nav-search-clear:hover {
    background: rgba(255, 102, 102, 0.2);
    color: #ff8888;
}

.navbar .user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-music,
.btn-labels {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
    font-size: 18px;
    padding: 8px 16px;
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.btn-labels {
    min-width: 76px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-music:hover,
.btn-labels:hover {
    background: rgba(74, 158, 255, 0.3);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.4);
}

.btn-music.muted,
.btn-labels.off {
    color: #666;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.language-select {
    height: 36px;
    min-width: 96px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid rgba(74, 158, 255, 0.3);
    background: rgba(0, 5, 17, 0.85);
    color: #dcecff;
    outline: none;
    cursor: pointer;
}

.language-select:hover,
.language-select:focus {
    border-color: rgba(74, 158, 255, 0.7);
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.25);
}

.btn-primary {
    background: #4a9eff;
    color: white;
}

.btn-primary:hover {
    background: #3a8eef;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.6);
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    cursor: grab;
}

#info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #4a9eff;
    border-radius: 15px;
    padding: 30px;
    min-width: 500px;
    max-width: 700px;
    display: none;
    z-index: 2000;
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.5);
}

#info-panel.active {
    display: block;
}

.planet-title {
    color: #4a9eff;
    font-size: 26px;
    margin-bottom: 15px;
    text-align: center;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 62% 35%, rgba(54, 93, 130, 0.18), transparent 36%), rgba(0, 5, 17, 0.38);
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    width: min(96vw, 1200px);
}

.loading-hero {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-astronaut-img {
    width: 760px;
    height: auto;
    max-width: 72vw;
    transform: rotate(0deg);
    animation: astronautFloat 4.8s ease-in-out infinite;
    filter: drop-shadow(0 0 35px rgba(74, 158, 255, 0.55));
}

@keyframes astronautFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(0, -20px, 0) rotate(0deg);
    }
}

.loading-text {
    color: #4a9eff;
    font-size: 32px;
    font-weight: bold;
    margin-top: 30px;
    text-shadow: 0 0 18px rgba(74, 158, 255, 0.65);
    letter-spacing: 2px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #4a9eff;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.6);
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* ========== 侧边面板样式 ========== */
.side-panel {
    position: fixed;
    top: 80px;
    width: 280px;
    max-height: calc(100vh - 100px);
    background: rgba(10, 20, 40, 0.15);
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    z-index: 100;
    backdrop-filter: blur(30px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.left-panel {
    left: 20px;
}

.right-panel {
    right: 20px;
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.3);
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #4a9eff;
}

.panel-content {
    color: #fff;
}

/* 统计区块 */
.stat-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-section:last-child {
    border-bottom: none;
}

.stat-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #aaa;
}

.stat-value {
    font-size: 14px;
    color: #fff;
}

/* 健康度评分 */
.health-score {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a9eff, #44ff88);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.health-stats {
    flex: 1;
    font-size: 13px;
}

.health-stats div {
    margin-bottom: 5px;
    color: #bbb;
}

.health-stats span {
    color: #4a9eff;
    font-weight: bold;
}

/* 统计列表 */
.stat-list {
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #ccc;
}

.stat-item span:last-child {
    color: #4a9eff;
    font-weight: bold;
}

.stat-chart {
    height: 60px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    gap: 4px;
}

/* 最近笔记 */
.recent-notes {
    max-height: 150px;
    overflow-y: auto;
}

.note-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.note-item:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateX(5px);
}

.planet-keywords-block {
    margin: 18px 0;
    padding: 14px;
    border-radius: 8px;
    background: rgba(74, 158, 255, 0.06);
}
.planet-keywords-block h4 { color: #7aa8d4; margin-bottom: 10px; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-tag {
    display: inline-flex;
    padding: 4px 10px;
    border: 1px solid rgba(74, 158, 255, 0.28);
    border-radius: 999px;
    color: #9fc8f0;
    background: rgba(74, 158, 255, 0.1);
    font-size: 12px;
}

/* ========== 日历样式 ========== */
.calendar-section {
    margin-bottom: 20px;
}

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

.calendar-nav {
    background: rgba(74, 158, 255, 0.2);
    border: none;
    color: #4a9eff;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.calendar-nav:hover {
    background: rgba(74, 158, 255, 0.4);
}

#current-month {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.calendar-grid {
    background: rgba(74, 158, 255, 0.01);
    padding: 15px;
    border-radius: 8px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 12px;
    color: #888;
    font-weight: bold;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.calendar-day:hover {
    background: rgba(74, 158, 255, 0.2);
}

.calendar-day.today {
    background: #4a9eff;
    color: #fff;
    font-weight: bold;
}

.calendar-day.has-task::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    background: #44ff88;
    border-radius: 50%;
}

.calendar-day.other-month {
    color: #555;
}

/* 名人简介 */
.celebrity-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(74, 158, 255, 0.12);
}

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

.celebrity-header h4 {
    margin: 0;
    font-size: 14px;
    color: #aaa;
    font-weight: 600;
}

.celebrity-nav {
    display: flex;
    gap: 4px;
}

.celebrity-nav-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.celebrity-nav-btn:hover {
    background: rgba(74, 158, 255, 0.3);
}

.celebrity-card {
    background: rgba(74, 158, 255, 0.06);
    border: 1px solid rgba(74, 158, 255, 0.12);
    border-radius: 10px;
    padding: 12px;
}

.celebrity-empty {
    color: #6b7d8e;
    font-size: 12px;
    text-align: center;
    padding: 16px 8px;
}

.celebrity-top {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.celebrity-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(74, 158, 255, 0.15);
    border: 1px solid rgba(74, 158, 255, 0.25);
    flex-shrink: 0;
}

.celebrity-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a9eff;
    font-size: 18px;
    font-weight: 700;
}

.celebrity-meta {
    min-width: 0;
    flex: 1;
}

.celebrity-name {
    color: #e8f0ff;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
}

.celebrity-title {
    color: #7aa8d4;
    font-size: 12px;
    margin: 0 0 2px;
}

.celebrity-era,
.celebrity-field {
    color: #6b7d8e;
    font-size: 11px;
    margin: 0;
}

.celebrity-summary {
    color: #c0cdd8;
    font-size: 12px;
    line-height: 1.55;
    margin: 0 0 8px;
}

.celebrity-more {
    border: none;
    background: transparent;
    color: #4a9eff;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.celebrity-more:hover {
    text-decoration: underline;
}

.celebrity-detail {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(74, 158, 255, 0.18);
}

.celebrity-detail.open {
    display: block;
}

.celebrity-detail h5 {
    margin: 0 0 6px;
    color: #7aa8d4;
    font-size: 12px;
}

.celebrity-detail p {
    margin: 0 0 10px;
    color: #b8c6d4;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 今日任务 */
.today-tasks-section {
    margin-top: 20px;
}

.today-tasks-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #aaa;
}

.task-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(68, 255, 136, 0.1);
    border-left: 3px solid #44ff88;
    border-radius: 6px;
    font-size: 13px;
    color: #ddd;
}

/* 滚动条样式 */
.side-panel::-webkit-scrollbar,
.recent-notes::-webkit-scrollbar {
    width: 6px;
}

.side-panel::-webkit-scrollbar-track,
.recent-notes::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb,
.recent-notes::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb:hover,
.recent-notes::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.5);
}

@media (max-width: 900px) {
    .loading-hero {
        height: 310px;
    }

    .loading-brand {
        left: 50%;
        top: 58%;
        transform: translate(-50%, -50%);
        font-size: clamp(28px, 9vw, 46px);
        letter-spacing: 8px;
    }

    .loading-astronaut-img {
        right: 50%;
        top: -12px;
        width: 220px;
        max-width: 45vw;
        transform: translateX(50%) rotate(12deg) scale(0.82);
    }

    @keyframes astronautFloat {
        0%, 100% {
            transform: translateX(50%) translate3d(0, 0, 0) rotate(12deg) scale(0.82);
        }
        50% {
            transform: translateX(50%) translate3d(-8px, -14px, 0) rotate(16deg) scale(0.82);
        }
    }
}

/* 响应式 */
@media (max-width: 1400px) {
    .side-panel {
        width: 240px;
    }
}

@media (max-width: 1200px) {
    .side-panel {
        display: none;
    }
}
