        body {
            font-family: 'Noto Sans SC', sans-serif;
            background: #0a0a1a;
            color: #e0e0ff;
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* 星空背景 */
        .stars {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            pointer-events: none;
            z-index: 0;
        }
        .star {
            position: absolute;
            background: white;
            border-radius: 50%;
            animation: twinkle var(--duration) ease-in-out infinite;
        }
        @keyframes twinkle {
            0%, 100% { opacity: 0.2; transform: scale(0.8); }
            50% { opacity: 1; transform: scale(1.2); }
        }

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

        /* 头部 */
        .header {
            text-align: center;
            padding: 30px 0 20px;
        }
        .header h1 {
            font-size: 2.2rem;
            background: linear-gradient(135deg, #ffd700, #ff6b9d, #c445ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
            letter-spacing: 2px;
        }
        .header p {
            color: #8892b0;
            font-size: 0.95rem;
        }

        /* Tab 切换 */
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 24px;
            background: rgba(255,255,255,0.05);
            padding: 6px;
            border-radius: 16px;
            backdrop-filter: blur(10px);
        }
        .tab {
            flex: 1;
            padding: 12px;
            text-align: center;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
            border: none;
            background: transparent;
            color: #8892b0;
            font-size: 0.95rem;
        }
        .tab.active {
            background: linear-gradient(135deg, rgba(196,69,255,0.3), rgba(255,107,157,0.3));
            color: #fff;
            box-shadow: 0 4px 20px rgba(196,69,255,0.2);
        }
        .tab:hover:not(.active) {
            color: #c445ff;
        }

        /* 内容区 */
        .content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        .panel { display: none; }
        .panel.active { display: flex; flex-direction: column; gap: 20px; }

        /* 玻璃卡片 */
        .glass-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            padding: 24px;
            backdrop-filter: blur(10px);
        }

        /* 星座选择 */
        .section-title {
            font-size: 1.1rem;
            margin-bottom: 16px;
            color: #ffd700;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .zodiac-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }
        .zodiac-item {
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.05);
            border: 2px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1.8rem;
            padding: 8px;
        }
        .zodiac-item span.label {
            font-size: 0.75rem;
            margin-top: 4px;
            color: #8892b0;
        }
        .zodiac-item:hover {
            border-color: rgba(196,69,255,0.5);
            transform: translateY(-2px);
            background: rgba(196,69,255,0.1);
        }
        .zodiac-item.selected {
            border-color: #c445ff;
            background: rgba(196,69,255,0.2);
            box-shadow: 0 0 20px rgba(196,69,255,0.3);
        }
        .zodiac-item.selected span.label { color: #fff; }

        /* 时间选择 */
        .time-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 20px;
        }
        .time-item {
            padding: 12px 8px;
            text-align: center;
            background: rgba(255,255,255,0.05);
            border: 2px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.85rem;
            color: #8892b0;
        }
        .time-item:hover {
            border-color: rgba(255,215,0,0.5);
            color: #ffd700;
        }
        .time-item.selected {
            border-color: #ffd700;
            background: rgba(255,215,0,0.15);
            color: #ffd700;
            box-shadow: 0 0 15px rgba(255,215,0,0.2);
        }

        /* 按钮 */
        .btn-primary {
            width: 100%;
            padding: 16px;
            background: linear-gradient(135deg, #c445ff, #ff6b9d);
            border: none;
            border-radius: 14px;
            color: white;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            letter-spacing: 2px;
        }
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(196,69,255,0.4);
        }
        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        .btn-secondary {
            padding: 10px 20px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 10px;
            color: #e0e0ff;
            cursor: pointer;
            transition: all 0.3s;
        }
        .btn-secondary:hover {
            background: rgba(255,255,255,0.15);
        }

        /* 结果区 */
        .result-area {
            min-height: 120px;
            max-height: 500px;
            overflow-y: auto;
            background: rgba(0,0,0,0.2);
            border-radius: 16px;
            padding: 20px;
            line-height: 1.8;
            font-size: 0.95rem;
        }
        .result-area h3 {
            color: #ffd700;
            margin: 16px 0 8px;
        }
        .result-area h4 {
            color: #ff6b9d;
            margin: 12px 0 6px;
        }
        .result-area p { margin-bottom: 8px; }
        .result-area ul { margin-left: 20px; margin-bottom: 8px; }
        .result-area blockquote {
            border-left: 3px solid #c445ff;
            padding-left: 12px;
            margin: 10px 0;
            color: #b0b8d0;
        }

        /* 加载动画 */
        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px;
            gap: 16px;
        }
        .spinner {
            width: 48px; height: 48px;
            border: 3px solid rgba(196,69,255,0.3);
            border-top-color: #c445ff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .loading-text {
            color: #8892b0;
            font-size: 0.9rem;
        }

        /* 挽回测试 */
        .quiz-welcome {
            text-align: center;
            padding: 40px 20px;
        }
        .quiz-welcome h2 {
            font-size: 1.5rem;
            margin-bottom: 12px;
            background: linear-gradient(135deg, #ff6b9d, #c445ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .quiz-welcome p {
            color: #8892b0;
            margin-bottom: 24px;
            line-height: 1.6;
        }

        .quiz-progress {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 24px;
        }
        .progress-bar {
            flex: 1;
            height: 6px;
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
            overflow: hidden;
        }
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #c445ff, #ff6b9d);
            border-radius: 3px;
            transition: width 0.5s ease;
        }
        .progress-text {
            font-size: 0.85rem;
            color: #8892b0;
            min-width: 50px;
            text-align: right;
        }

        .question-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            padding: 28px;
            margin-bottom: 20px;
        }
        .question-number {
            display: inline-block;
            padding: 4px 12px;
            background: linear-gradient(135deg, #c445ff, #ff6b9d);
            border-radius: 20px;
            font-size: 0.8rem;
            margin-bottom: 16px;
        }
        .question-text {
            font-size: 1.15rem;
            line-height: 1.6;
            margin-bottom: 24px;
            color: #fff;
        }
        .options-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .option-btn {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 16px;
            background: rgba(255,255,255,0.05);
            border: 2px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: left;
            color: #e0e0ff;
            font-size: 0.95rem;
            line-height: 1.5;
        }
        .option-btn:hover {
            border-color: rgba(196,69,255,0.5);
            background: rgba(196,69,255,0.1);
        }
        .option-btn .opt-label {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            height: 32px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
            font-weight: 700;
            color: #ffd700;
            font-size: 0.9rem;
        }
        .option-btn:hover .opt-label {
            background: #c445ff;
            color: white;
        }

        .quiz-nav {
            display: flex;
            gap: 12px;
            margin-top: 8px;
        }
        .quiz-nav button {
            flex: 1;
        }

        /* 结果报告 */
        .report-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            padding: 28px;
            text-align: center;
        }
        .report-score {
            font-size: 3rem;
            font-weight: 700;
            background: linear-gradient(135deg, #ffd700, #ff6b9d);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 10px 0;
        }
        .report-stars {
            font-size: 1.5rem;
            margin-bottom: 16px;
            letter-spacing: 4px;
        }
        .report-level {
            display: inline-block;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 20px;
        }
        .level-high { background: rgba(255,215,0,0.15); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
        .level-mid { background: rgba(196,69,255,0.15); color: #c445ff; border: 1px solid rgba(196,69,255,0.3); }
        .level-low { background: rgba(255,107,157,0.15); color: #ff6b9d; border: 1px solid rgba(255,107,157,0.3); }
        .level-verylow { background: rgba(100,100,120,0.2); color: #8892b0; border: 1px solid rgba(100,100,120,0.3); }

        .report-section {
            text-align: left;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid rgba(255,255,255,0.08);
        }
        .report-section h4 {
            color: #ffd700;
            margin-bottom: 10px;
            font-size: 1rem;
        }
        .report-section p, .report-section li {
            color: #b0b8d0;
            line-height: 1.7;
            font-size: 0.9rem;
        }
        .report-section ul { margin-left: 18px; }
        .report-section li { margin-bottom: 6px; }

        /* 自由对话 */
        .chat-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-height: 400px;
        }
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 10px;
            max-height: 500px;
        }
        .msg {
            max-width: 85%;
            padding: 14px 18px;
            border-radius: 18px;
            line-height: 1.6;
            font-size: 0.95rem;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .msg-user {
            align-self: flex-end;
            background: linear-gradient(135deg, #c445ff, #ff6b9d);
            color: white;
            border-bottom-right-radius: 4px;
        }
        .msg-ai {
            align-self: flex-start;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.1);
            color: #e0e0ff;
            border-bottom-left-radius: 4px;
        }
        .msg-ai h1, .msg-ai h2, .msg-ai h3 { color: #ffd700; margin: 10px 0 6px; font-size: 1.1rem; }
        .msg-ai h4 { color: #ff6b9d; margin: 8px 0 4px; }
        .msg-ai ul { margin-left: 18px; margin-bottom: 8px; }
        .msg-ai li { margin-bottom: 4px; }
        .msg-ai blockquote {
            border-left: 3px solid #c445ff;
            padding-left: 12px;
            margin: 8px 0;
            color: #b0b8d0;
        }
        .msg-ai p { margin-bottom: 6px; }
        .msg-ai strong { color: #ffd700; }

        .chat-input-area {
            display: flex;
            gap: 10px;
        }
        .chat-input {
            flex: 1;
            padding: 14px 18px;
            background: rgba(255,255,255,0.05);
            border: 2px solid rgba(255,255,255,0.1);
            border-radius: 14px;
            color: #e0e0ff;
            font-size: 0.95rem;
            outline: none;
            transition: all 0.3s;
        }
        .chat-input:focus {
            border-color: rgba(196,69,255,0.5);
            background: rgba(255,255,255,0.08);
        }
        .chat-input::placeholder { color: #556; }
        .chat-send {
            padding: 14px 24px;
            background: linear-gradient(135deg, #c445ff, #ff6b9d);
            border: none;
            border-radius: 14px;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        .chat-send:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 20px rgba(196,69,255,0.4);
        }

        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #556;
        }
        .empty-state .icon {
            font-size: 3rem;
            margin-bottom: 12px;
            opacity: 0.5;
        }

        /* 响应式 */
        @media (max-width: 600px) {
            .header h1 { font-size: 1.6rem; }
            .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
            .time-grid { grid-template-columns: repeat(3, 1fr); }
            .container { padding: 12px; }
            .question-text { font-size: 1rem; }
        }

        /* 滚动条美化 */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(196,69,255,0.3); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(196,69,255,0.5); }

        .hidden { display: none !important; }

        .site-nav {
            text-align: center;
            margin-bottom: 12px;
            font-size: 0.85rem;
        }
        .site-nav a {
            color: #8892b0;
            text-decoration: none;
        }
        .site-nav a:hover { color: #c445ff; }
        .site-footer {
            text-align: center;
            padding: 24px 0 16px;
            font-size: 0.75rem;
            color: #556;
        }
        .site-footer a { color: #8892b0; text-decoration: none; }
        .site-footer a:hover { color: #c445ff; }
        .disclaimer {
            text-align: center;
            font-size: 0.8rem;
            color: #667;
            margin-top: 8px;
            padding: 0 12px;
        }

/* 会话历史侧栏 */
.chat-layout {
    display: flex;
    gap: 12px;
    min-height: 480px;
}
.conv-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.conv-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8rem;
    color: #8892b0;
}
.conv-sidebar-header button {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: rgba(196,69,255,0.2);
    border: none;
    border-radius: 8px;
    color: #e0e0ff;
    cursor: pointer;
}
.conv-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.conv-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.2s;
}
.conv-item:hover { background: rgba(255,255,255,0.06); }
.conv-item.active { background: rgba(196,69,255,0.2); border: 1px solid rgba(196,69,255,0.3); }
.conv-item-title {
    font-size: 0.85rem;
    color: #e0e0ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conv-item-time { font-size: 0.7rem; color: #556; margin-top: 4px; }
.conv-empty { padding: 24px 12px; text-align: center; color: #556; font-size: 0.8rem; }
.conv-load-more, .history-load-hint {
    padding: 10px;
    text-align: center;
    font-size: 0.75rem;
    color: #667;
}
.history-load-hint { color: #8892b0; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

@media (max-width: 700px) {
    .chat-layout { flex-direction: column; }
    .conv-sidebar { width: 100%; max-height: 160px; }
}

.sse-cursor::after {
    content: '▋';
    animation: blink 1s step-end infinite;
    color: #c445ff;
    margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }
