
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'STFangsong', 'STKaiti', 'SimSun', serif;
font-weight: bold;
        }
        :root {
            --text-color: #333;
            --bg-color: #fff;
            --card-bg: rgba(255, 255, 255, 0.7);
            --card-border: rgba(0, 0, 0, 0.08);
            --card-shadow: rgba(0, 0, 0, 0.1);
            --accent-color: rgba(100, 100, 100, 0.6);
            --chat-bg: rgba(255, 255, 255, 0.5);
            --user-msg-bg: rgba(240, 240, 240, 0.9);
            --ai-msg-bg: rgba(255, 255, 255, 0.9);
            --ai-msg-border: #000;
            --button-bg: #333;
            --button-color: white;
            --input-bg: rgba(255, 255, 255, 0.8);
            --input-border: #ddd;
            --modal-bg: white;
            --transition-speed: 1.5s;
        }
        body.dark-mode {
            --text-color: #eee;
            --bg-color: #222;
            --card-bg: rgba(30, 30, 30, 0.8);
            --card-border: rgba(255, 255, 255, 0.1);
            --card-shadow: rgba(0, 0, 0, 0.3);
            --accent-color: rgba(150, 150, 150, 0.6);
            --chat-bg: rgba(30, 30, 30, 0.7);
            --user-msg-bg: rgba(50, 50, 50, 0.9);
            --ai-msg-bg: rgba(40, 40, 40, 0.9);
            --ai-msg-border: #777;
            --button-bg: #444;
            --button-color: #eee;
            --input-bg: rgba(40, 40, 40, 0.8);
            --input-border: #555;
            --modal-bg: #222;
        }
        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            height: 100vh;
            overflow: hidden;
            position: relative;
            transition: all var(--transition-speed) ease;
        }
        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('/public/bizi.webp');
            background-size: cover;
            background-position: center;
            z-index: -1;
            transition: filter var(--transition-speed) ease, background-image var(--transition-speed) ease;
        }
        body.dark-mode::before {
            filter: brightness(0.4) contrast(1.2) sepia(0.2);
        }
        #page-transition {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, var(--bg-color) 0%, transparent 100%);
            z-index: 1000;
            opacity: 1;
            pointer-events: none;
            transition: opacity 1.5s ease;
        }
        #app {
            height: 100vh;
            width: 100%;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        header {
            text-align: center;
            padding: 30px 0 20px;
            position: relative;
            z-index: 2;
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), transparent);
            transition: background var(--transition-speed) ease;
        }
        body.dark-mode header {
            background: linear-gradient(to bottom, rgba(20, 20, 20, 0.9), transparent);
        }
        h1 {
            font-size: calc(2rem + 1.5vw);
            letter-spacing: 6px;
            text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
            margin-bottom: 10px;
            font-weight: normal;
            color: var(--text-color);
            writing-mode: horizontal-tb;
            position: relative;
            display: inline-block;
            transition: color var(--transition-speed) ease;
font-family:"楷体", "KaiTi", "BiauKai", serif;
        }
        h1::after {
            content: "";
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60%;
            height: 1px;
            background: linear-gradient(to right, transparent, var(--text-color), transparent);
            opacity: 0.5;
            transition: background var(--transition-speed) ease;
        }
        #taiji-container {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            z-index: -1;
            width: 80px;
            height: 80px;
            opacity: 0.15;
        }
        #taiji {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: linear-gradient(90deg, #000 50%, #fff 50%);
            animation: rotate 30s linear infinite;
            position: relative;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        }
        #taiji:before,
        #taiji:after {
            content: '';
            position: absolute;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            left: 50%;
            transform: translateX(-50%);
        }
        #taiji:before {
            top: 0;
            background: radial-gradient(circle at center, #fff 0, #fff 30%, #000 30%, #000 100%);
        }
        #taiji:after {
            bottom: 0;
            background: radial-gradient(circle at center, #000 0, #000 30%, #fff 30%, #fff 100%);
        }
        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        main {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
        }
        #home-screen {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 40px;
            padding: 20px;
            max-width: 1200px;
            transform: translateY(0);
            opacity: 1;
            transition: transform 0.5s ease, opacity 0.5s ease;
        }
        #home-screen.hide {
            transform: translateY(30px);
            opacity: 0;
        }
        .sage-card {
            text-align: center;
            width: 220px;
            cursor: pointer;
            transition: all 0.5s ease;
            background: var(--card-bg);
            padding: 15px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 15px var(--card-shadow);
            position: relative;
            border: 1px solid var(--card-border);
            overflow: hidden;
            transform: translateY(50px);
            opacity: 0;
            animation: card-appear 0.8s forwards;
height: auto;           /* 高度自动调整 */
    min-height: 100px;      /* 设置最小高度 */
        }
        @keyframes card-appear {
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        .sage-card:nth-child(1) { animation-delay: 0.2s; }
        .sage-card:nth-child(2) { animation-delay: 0.4s; }
        .sage-card:nth-child(3) { animation-delay: 0.6s; }
        .sage-card:nth-child(4) { animation-delay: 0.8s; }
        .sage-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border: 1px solid rgba(0, 0, 0, 0.15);
            margin: 8px;
            pointer-events: none;
            background-image:
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.12' d='M20,10 Q30,5 40,10 Q50,15 60,10 Q70,5 80,10 L80,20 Q70,25 60,20 Q50,15 40,20 Q30,25 20,20 Z'/%3E%3C/svg%3E"),
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.12' d='M20,80 Q30,85 40,80 Q50,75 60,80 Q70,85 80,80 L80,90 Q70,95 60,90 Q50,85 40,90 Q30,95 20,90 Z'/%3E%3C/svg%3E");
            background-position: top center, bottom center;
            background-repeat: no-repeat;
            opacity: 0.8;
            transition: opacity 0.4s ease;
        }
        .sage-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
            background: var(--card-bg);
        }
        .sage-card:hover::before {
            opacity: 1;
        }
        .sage-avatar {
            width: 130px;
            height: 130px;
            border-radius: 50%;
            margin: 0 auto 18px;
            background-size: cover;
            background-position: center;
            border: none;
            position: relative;
            overflow: hidden;
            background-clip: padding-box;
            border: 2px solid transparent;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2),
                        inset 0 0 0 4px rgba(210, 210, 180, 0.4);
            transition: transform 0.6s ease;
        }
        .sage-card:hover .sage-avatar {
            transform: scale(1.05);
        }
        .sage-avatar::before {
            content: "";
            position: absolute;
            top: -4px;
            left: -4px;
            right: -4px;
            bottom: -4px;
            background:
                linear-gradient(to bottom right, rgba(0,0,0,0.15), transparent, rgba(0,0,0,0.15)),
                linear-gradient(to bottom left, rgba(0,0,0,0.15), transparent, rgba(0,0,0,0.15));
            border-radius: 50%;
            z-index: -1;
        }
        .sage-name {
            font-size: 1.8em;
            margin-bottom: 8px;
            font-weight: normal;
            letter-spacing: 3px;
            color: var(--text-color);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
            transition: color var(--transition-speed) ease;
        }
        .sage-title {
            font-size: 0.8em;
            color: var(--text-color);
            opacity: 0.7;
            letter-spacing: 1px;
            position: relative;
            display: inline-block;
            padding: 0 8px;
            transition: color var(--transition-speed) ease;
        }
        .sage-title::before {
            content: "";
            position: absolute;
            top: 50%;
            left: -15px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-color);
            transform: translateY(-50%);
        }
        .sage-title::after {
            content: "";
            position: absolute;
            top: 50%;
            right: -15px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-color);
            transform: translateY(-50%);
        }
        #chat-screen {
            display: none;
            flex-direction: column;
            width: 100%;
            height: 100%;
            padding: 10px;
            max-width: 900px;
            margin: 0 auto 10px;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.5s ease, transform 0.5s ease;
        }
        #chat-screen.show {
            opacity: 1;
            transform: translateY(0);
        }
        #chat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            margin-bottom: 10px;
        }
        body.dark-mode #chat-header {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        #chat-title {
            font-size: 1.5em;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        #chat-sage-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-size: cover;
            background-position: center;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }
        #settings-btn, #back-btn, #export-btn, #meditation-toggle, #music-toggle, #classics-btn, #fortune-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.2em;
            color: var(--text-color);
            opacity: 0.7;
            transition: all 0.3s ease;
            margin-left: 8px;
text-shadow:
                2px 2px 4px rgba(0, 0, 0, 0.5),  /* 第一层阴影，模糊和扩展更多 */
                -2px -2px 4px rgba(255, 255, 255, 0.8), /* 第二层白色阴影，模糊和扩展更多 */
                2px -2px 4px rgba(0, 0, 0, 0.5),  /* 第三层阴影，模糊和扩展更多 */
                -2px 2px 4px rgba(255, 255, 255, 0.8);
        }
        #settings-btn:hover, #back-btn:hover, #export-btn:hover, #meditation-toggle:hover,
        #music-toggle:hover, #classics-btn:hover, #fortune-btn:hover {
            opacity: 1;
            transform: scale(1.1);
        }
        #back-btn {
            margin-right: 10px;
        }
        #chat-messages {
            flex: 1;
max-height: calc(90vh - 160px);
            overflow-y: auto;
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 10px;
            background: var(--chat-bg);
            border-radius: 8px;
            border: 1px solid var(--card-border);
            background-attachment: fixed;
            background-position: center;
            scrollbar-width: thin;
            scrollbar-color: var(--card-border) transparent;
            transition: background var(--transition-speed) ease, border var(--transition-speed) ease;
        }
        #chat-messages::-webkit-scrollbar {
            width: 6px;
        }
        #chat-messages::-webkit-scrollbar-track {
            background: transparent;
        }
        #chat-messages::-webkit-scrollbar-thumb {
            background-color: var(--card-border);
            border-radius: 3px;
        }
        .message {
            max-width: 80%;
            padding: 12px 18px;
            border-radius: 8px;
            position: relative;
            font-size: 1em;
            line-height: 1.6;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
            animation: message-appear 0.5s ease forwards;
            opacity: 0;
            transform: translateY(10px);
        }
        @keyframes message-appear {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .user-message {
            align-self: flex-end;
            background-color: var(--user-msg-bg);
            border-bottom-right-radius: 2px;
            border-right: 3px solid rgba(0, 0, 0, 0.2);
            color: var(--text-color);
        }
        .ai-message {
            align-self: flex-start;
            background-color: var(--ai-msg-bg);
            border-bottom-left-radius: 2px;
            border-left: 3px solid var(--ai-msg-border);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            color: var(--text-color);
        }
        .ai-message::before {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 10px;
            height: 10px;
            background-color: rgba(0, 0, 0, 0.1);
            border-radius: 0 10px 0 0;
        }
        .ai-message a {
            color: var(--accent-color);
            text-decoration: none;
            border-bottom: 1px dotted;
            transition: border-bottom 0.3s;
        }
        .ai-message a:hover {
            border-bottom: 1px solid;
        }
        .ai-message blockquote {
            border-left: 3px solid var(--accent-color);
            padding-left: 10px;
            margin: 10px 0;
            color: var(--text-color);
            opacity: 0.8;
        }
        .ai-message code {
            background: rgba(0, 0, 0, 0.05);
            padding: 2px 4px;
            border-radius: 3px;
            font-family: monospace;
        }
        body.dark-mode .ai-message code {
            background: rgba(255, 255, 255, 0.1);
        }
        #chat-input {
            display: flex;
            gap: 10px;
            background: var(--input-bg);
            padding: 10px;
            border-radius: 8px;
            border: 1px solid var(--input-border);
            transition: background var(--transition-speed) ease, border var(--transition-speed) ease;
        }
        #user-input {
            flex: 1;
            padding: 10px;
height: 40px; /* 设置初始高度更小 */
    max-height: 150px; /* 限制最大高度 */
            border: 1px solid var(--input-border);
            border-radius: 5px;
            font-size: 1em;
            background: var(--input-bg);
            color: var(--text-color);
            resize: none;
            transition: border 0.3s ease, background var(--transition-speed) ease, color var(--transition-speed) ease;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}
#user-input::-webkit-scrollbar {
    display: none;  /* Chrome/Safari/Opera */
}
        }
        #user-input:focus {
            outline: none;
            border-color: var(--text-color);
        }
        #send-btn {
            padding: 0 20px;
            background: var(--button-bg);
            color: var(--button-color);
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1em;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }
        #send-btn:hover {
            background: #000;
            transform: translateY(-2px);
        }
        body.dark-mode #send-btn:hover {
            background: #222;
        }
        #send-btn::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5px;
            height: 5px;
            background: rgba(255, 255, 255, 0.5);
            opacity: 0;
            border-radius: 100%;
            transform: scale(1, 1) translate(-50%);
            transform-origin: 50% 50%;
        }
        #send-btn:focus:not(:active)::after {
            animation: ripple 1s ease-out;
        }
        @keyframes ripple {
            0% {
                transform: scale(0, 0);
                opacity: 1;
            }
            20% {
                transform: scale(25, 25);
                opacity: 1;
            }
            100% {
                opacity: 0;
                transform: scale(40, 40);
            }
        }
        #settings-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 100;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }
        .modal-content {
            background: var(--modal-bg);
            padding: 25px;
            border-radius: 10px;
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            transform: translateY(20px);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            animation: modal-appear 0.5s forwards;
        }
        @keyframes modal-appear {
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        .modal-content::before {
            content: "";
            position: absolute;
            top: 10px;
            left: 10px;
            right: 10px;
            bottom: 10px;
            border: 1px solid var(--card-border);
            pointer-events: none;
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--card-border);
        }
        .modal-title {
            font-size: 1.5em;
            font-weight: normal;
            letter-spacing: 2px;
            color: var(--text-color);
        }
        .close-btn {
            background: none;
            border: none;
            font-size: 1.5em;
            cursor: pointer;
            transition: transform 0.3s ease;
            color: var(--text-color);
        }
        .close-btn:hover {
            transform: rotate(90deg);
        }
        .form-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: normal;
            letter-spacing: 1px;
            color: var(--text-color);
        }
        .settings-input, #api-provider { /* <!-- 新增样式适配 --> */
            width: 100%;
            padding: 10px;
            border: 1px solid var(--input-border);
            border-radius: 4px;
            font-size: 1em;
            transition: border 0.3s ease;
            background-color: var(--input-bg);
            color: var(--text-color);
        }
        .settings-input:focus, #api-provider:focus { /* <!-- 新增样式适配 --> */
            outline: none;
            border-color: var(--text-color);
        }
        .save-btn {
            background: var(--button-bg);
            color: var(--button-color);
            border: none;
            padding: 12px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1em;
            transition: all 0.3s;
            display: block;
            margin: 0 auto;
            letter-spacing: 1px;
        }
        .save-btn:hover {
            background: #000;
            transform: translateY(-2px);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }
        body.dark-mode .save-btn:hover {
            background: #222;
        }
        /* 删除原有的loading样式，我们不再需要它 */
        footer {
            text-align: center;
            padding: 10px;
            font-size: 0.9em;
            position: relative;
            color: var(--text-color);
            opacity: 0.7;
            transition: color var(--transition-speed) ease;
margin-top: 5px; /* 添加小的上边距 */
        }
        /* 主题切换开关 */
        .theme-toggle {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            z-index: 100;
            transition: transform 0.3s ease-in-out;
        }
        .theme-toggle:hover {
            transform: scale(1.1);
        }
        .theme-toggle-taiji {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: linear-gradient(90deg, #000 50%, #fff 50%);
            position: relative;
            transition: transform 1.5s ease;
            box-shadow: 0 0 10px rgba(0,0,0,0.3);
        }
        .theme-toggle-taiji::before,
        .theme-toggle-taiji::after {
            content: '';
            position: absolute;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            box-sizing: border-box;
            overflow: hidden;
        }
        .theme-toggle-taiji::before {
            top: 0;
            left: 7.5px;
            background: radial-gradient(circle at center, #fff 0, #fff 30%, #000 30%, #000 100%);
        }
        .theme-toggle-taiji::after {
            bottom: 0;
            right: 7.5px;
            background: radial-gradient(circle at center, #000 0, #000 30%, #fff 30%, #fff 100%);
        }
        /* 冥想计时器 */
        #meditation-timer {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--card-bg);
            border-radius: 10px;
            padding: 15px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: none;
            flex-direction: column;
            align-items: center;
            z-index: 10;
            backdrop-filter: blur(5px);
            transform: translateY(20px);
            opacity: 0;
            transition: transform 0.5s ease, opacity 0.5s ease, background var(--transition-speed) ease;
            border: 1px solid var(--card-border);
        }
        #meditation-timer.show {
            transform: translateY(0);
            opacity: 1;
        }
        #timer-display {
            font-size: 2em;
            margin: 15px 0;
            font-family: monospace;
            color: var(--text-color);
            transition: color var(--transition-speed) ease;
        }
        .timer-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
        }
        .timer-btn {
            padding: 8px 12px;
            border: none;
            background: var(--button-bg);
            color: var(--button-color);
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .timer-btn:hover {
            background: #000;
            transform: translateY(-2px);
        }
        body.dark-mode .timer-btn:hover {
            background: #222;
        }
        /* 水墨动画 */
        .ink-splash {
            position: fixed;
            pointer-events: none;
            width: 0;
            height: 0;
            background: radial-gradient(rgba(0,0,0,0.2) 0%, transparent 70%);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            z-index: -1;
            animation: ink-spread 3s ease-out forwards;
        }
        body.dark-mode .ink-splash {
            background: radial-gradient(rgba(255,255,255,0.1) 0%, transparent 70%);
        }
        @keyframes ink-spread {
            0% {
                width: 0;
                height: 0;
                opacity: 1;
            }
            100% {
                width: 500px;
                height: 500px;
                opacity: 0;
            }
        }
        /* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: calc(1.8rem + 1vw);
        letter-spacing: 5px;
    }
    #home-screen {
        gap: 15px;
        padding: 5px;
    }
    .sage-card {
        width: 140px;
        padding: 12px 8px;
    }
    .sage-avatar {
        width: 90px;
        height: 90px;
    }
    .sage-name {
        font-size: 1.2em;
    }
    .sage-title {
        font-size: 0.7em;
    }
    .message {
        max-width: 95%;
        padding: 10px 15px;
    }
    #chat-screen {
        padding: 5px;
    }
    .timer-buttons {
        flex-direction: column;
    }
    /* 移动端添加以下优化 */
    .container {
        padding: 10px 20px;
    }
    .buttons {
        gap: 20px;
    }
    /* 修改底部导航栏和按钮布局 */
    #chat-header {
        padding: 5px 0;
    }
    #chat-title {
        font-size: 1.2em;
    }
    #chat-sage-avatar {
        width: 30px;
        height: 30px;
    }
    #settings-btn, #back-btn, #export-btn, #meditation-toggle, #music-toggle, #classics-btn, #fortune-btn {
        margin-left: 5px;
        font-size: 1em;
    }
    /* 改进聊天区域 */
    #chat-messages {
        max-height: calc(100vh - 180px);
    }
    /* 改进输入区域 */
    #chat-input {
        padding: 8px;
    }
    #user-input {
        height: 36px;
        padding: 8px;
    }
    #send-btn {
        padding: 0 15px;
    }
    /* 模态框调整 */
    .modal-content, .classics-content, .fortune-content {
        width: 95%;
        padding: 15px;
    }
    .chapter-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    /* 修改音乐播放器 */
    #music-title {
        max-width: 120px;
    }
    /* 修改主题切换按钮位置 */
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 25px;
        height: 25px;
    }
     /* 修复太极图内部小圆点的比例问题 */
    .theme-toggle-taiji::before,
    .theme-toggle-taiji::after {
        width: 12.5px;  /* 按比例缩小内部圆点 */
        height: 12.5px;
    }
    .theme-toggle-taiji::before {
        left: 6.25px;  /* 调整左侧圆点位置 */
    }
    .theme-toggle-taiji::after {
        right: 6.25px;  /* 调整右侧圆点位置 */
    }
    /* 可选：调整阴影使其更精致 */
    .theme-toggle-taiji {
        box-shadow: 0 0 5px rgba(0,0,0,0.2);
    }
}
/* 对于特小屏幕，进一步微调 */
@media (max-width: 375px) {
    .theme-toggle {
        width: 22px;
        height: 22px;
    }
    .theme-toggle-taiji::before,
    .theme-toggle-taiji::after {
        width: 11px;
        height: 11px;
    }
    .theme-toggle-taiji::before {
        left: 5.5px;
    }
    .theme-toggle-taiji::after {
        right: 5.5px;
    }
}
    /* 修改冥想计时器 */
    #meditation-timer {
        padding: 10px;
        bottom: 10px;
        right: 10px;
    }
    #timer-display {
        font-size: 1.5em;
        margin: 10px 0;
    }
    /* 增加触摸面积 */
    .sage-card, .chapter-item, .timer-btn, .music-control, .close-btn {
        min-height: 44px;
    }
}
/* 添加小屏幕手机额外适配 */
@media (max-width: 375px) {
    #home-screen {
        gap: 10px;
    }
    .sage-card {
        width: 120px;
    }
    .sage-avatar {
        width: 80px;
        height: 80px;
    }
    .buttons {
        gap: 10px;
    }
    /* 标题文字更紧凑 */
    h1 {
        font-size: calc(1.5rem + 1vw);
        letter-spacing: 3px;
    }
    #chat-title {
        font-size: 1em;
    }
    footer {
        font-size: 0.8em;
    }
}
        /* 页面加载动画 */
        .page-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-color);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }
        .loader-taiji {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(90deg, #000 50%, #fff 50%);
            position: relative;
            animation: rotate 2s linear infinite;
        }
        .loader-taiji:before,
        .loader-taiji:after {
            content: '';
            position: absolute;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            left: 50%;
            transform: translateX(-50%);
        }
        .loader-taiji:before {
            top: 0;
            background: radial-gradient(circle at center, #fff 0, #fff 30%, #000 30%, #000 100%);
        }
        .loader-taiji:after {
            bottom: 0;
            background: radial-gradient(circle at center, #000 0, #000 30%, #fff 30%, #fff 100%);
        }
        /* API密钥模糊显示 */
        #api-key-display {
            font-family: monospace;
            letter-spacing: 1px;
        }
        .api-key-hidden {
            color: transparent;
            text-shadow: 0 0 8px var(--text-color);
        }
        .show-api-key {
            display: flex;
            align-items: center;
            gap: 5px;
            margin-top: 5px;
        }
        /* 提示信息 */
        .toast {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 10px 20px;
            border-radius: 5px;
            z-index: 1000;
            opacity: 0;
            transition: transform 0.5s ease, opacity 0.5s ease;
        }
        .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        /* 新增：呼吸引导动画 */
        #breath-guide {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            z-index: 20;
            display: none;
            backdrop-filter: blur(2px);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        }
        .breath-circle {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            animation: breathe 8s infinite ease-in-out;
        }
        @keyframes breathe {
            0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.4; }
            50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
        }
        #breath-text {
            position: absolute;
            width: 100%;
            text-align: center;
            bottom: -30px;
            font-size: 1.2em;
            color: var(--text-color);
            transition: opacity 1s ease;
        }
        /* 新增：音乐播放器 */
        #music-player {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--card-bg);
            border-radius: 10px;
            padding: 10px 15px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: none;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 15px;
            z-index: 10;
            backdrop-filter: blur(5px);
            border: 1px solid var(--card-border);
        }
        #music-player.show {
            display: flex;
        }
        .music-control {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.3em;
            color: var(--text-color);
            transition: transform 0.3s ease;
        }
        .music-control:hover {
            transform: scale(1.2);
        }
        #music-title {
            font-size: 0.9em;
            color: var(--text-color);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 150px;
        }
        /* 新增：经典查询界面 */
        #classics-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 100;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }
        .classics-content {
            background: var(--modal-bg);
            padding: 25px;
            border-radius: 10px;
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            transform: translateY(20px);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            animation: modal-appear 0.5s forwards;
        }
        .classics-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--card-border);
        }
        .classics-title {
            font-size: 1.5em;
            font-weight: normal;
            letter-spacing: 2px;
            color: var(--text-color);
        }
        .classics-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--card-border);
            padding-bottom: 10px;
        }
        .classics-tab {
            padding: 8px 15px;
            cursor: pointer;
            border-radius: 5px 5px 0 0;
            transition: all 0.3s;
            border: 1px solid transparent;
            border-bottom: none;
            color: var(--text-color);
        }
        .classics-tab.active {
            background: var(--card-bg);
            border-color: var(--card-border);
        }
        .classics-tab:hover {
            background: rgba(0, 0, 0, 0.05);
        }
        .classics-content-area {
            display: none;
            max-height: 60vh;
            overflow-y: auto;
            padding: 10px;
            line-height: 1.8;
            letter-spacing: 1px;
            color: var(--text-color);
        }
        .classics-content-area.active {
            display: block;
        }
        .chapter-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 10px;
        }
        .chapter-item {
            padding: 8px;
            background: var(--card-bg);
            border-radius: 5px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        .chapter-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
        }
        .chapter-content {
            margin-top: 20px;
            display: none;
        }
        .chapter-content.show {
            display: block;
        }
        .back-to-chapters {
            margin-bottom: 15px;
            display: inline-block;
            padding: 5px 10px;
            background: var(--card-bg);
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .back-to-chapters:hover {
            transform: translateX(-5px);
        }
        /* 新增：道家智慧抽签 */
        #fortune-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 100;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }
        .fortune-content {
            background: var(--modal-bg);
            padding: 30px;
            border-radius: 10px;
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            text-align: center;
            transform: translateY(20px);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            animation: modal-appear 0.5s forwards;
        }
        .fortune-content::before {
            content: "";
            position: absolute;
            top: 10px;
            left: 10px;
            right: 10px;
            bottom: 10px;
            border: 1px solid var(--card-border);
            pointer-events: none;
        }
        #fortune-sticks {
            width: 150px;
            height: 220px;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="220" viewBox="0 0 150 220"><rect x="10" y="10" width="130" height="200" rx="5" fill="saddlebrown" stroke="black" stroke-width="2"/><g fill="burlywood"><rect x="20" y="20" width="5" height="180" rx="2"/><rect x="35" y="20" width="5" height="180" rx="2"/><rect x="50" y="20" width="5" height="180" rx="2"/><rect x="65" y="20" width="5" height="180" rx="2"/><rect x="80" y="20" width="5" height="180" rx="2"/><rect x="95" y="20" width="5" height="180" rx="2"/><rect x="110" y="20" width="5" height="180" rx="2"/><rect x="125" y="20" width="5" height="180" rx="2"/></g></svg>');
            margin: 0 auto 20px;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        #fortune-sticks:hover {
            transform: scale(1.05);
        }
        .fortune-instructions {
            margin-bottom: 20px;
            color: var(--text-color);
        }
        .fortune-result {
            display: none;
            padding: 20px;
            border: 1px solid var(--card-border);
            border-radius: 5px;
            margin-top: 20px;
            background: rgba(255, 255, 255, 0.1);
        }
        .fortune-text {
            font-family: 'STKaiti', 'KaiTi', serif;
            font-size: 1.2em;
            margin-bottom: 10px;
            line-height: 1.6;
            color: var(--text-color);
        }
        .fortune-meaning {
            font-size: 0.9em;
            opacity: 0.8;
            margin-top: 10px;
            color: var(--text-color);
        }
        #draw-again {
            margin-top: 20px;
            padding: 8px 15px;
            background: var(--button-bg);
            color: var(--button-color);
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
            display: none;
        }
        #draw-again:hover {
            background: #000;
            transform: translateY(-2px);
        }
        body.dark-mode #draw-again:hover {
            background: #222;
        }
        /* 思索中的文字动画效果 */
        @keyframes thinking-dots {
            0%, 20% { content: ""; }
            40% { content: "."; }
            60% { content: ".."; }
            80%, 100% { content: "..."; }
        }
        .thinking-message::after {
            content: "";
            animation: thinking-dots 1.5s infinite;
        }
:root {
    --ink-black: #1a1a1a;
    --paper-white: #fFF;
    --light-ink: #4a4a4a;
    --shadow-ink: rgba(26, 26, 26, 0.1);
}
.container {
    text-align: center;
    max-width: 800px;
    padding: 15px 40px;
    position: relative;
    z-index: 2;
    margin: 0 auto; /* 居中容器 */
    display: flex;
    justify-content: center;
}
.buttons {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}
.tao-button-container {
    position: relative;
    width: 88px;
    height: 32px;
}
.tao-button {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--light-ink);
    text-decoration: none;
    overflow: hidden;
    background: var(--paper-white);
    z-index: 2;
opacity: 0.4;
}
/* 内部水墨晕染效果 */
.ink-blot {
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        var(--ink-black) 15%,
        transparent 30%
    );
    opacity: 0.1;
    animation: inkSpread 8s infinite ease-in-out;
    z-index: 1;
}
.ink-blot:nth-child(1) {
    animation-delay: 0s;
}
.ink-blot:nth-child(2) {
    animation-delay: -2s;
    transform: rotate(45deg);
}
.ink-blot:nth-child(3) {
    animation-delay: -4s;
    transform: rotate(90deg);
}
/* 边框动态墨色效果 */
.ink-border {
    position: absolute;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    top: -5px;
    left: -5px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--light-ink),
        transparent
    );
    background-size: 200% 100%;
    animation: inkFlow 6s linear infinite;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}
.ink-border::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--paper-white);
    border-radius: 8px;
    z-index: 1;
}
@keyframes inkSpread {
    0%, 100% {
        transform: scale(0.5) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.2;
    }
}
@keyframes inkFlow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
@media (max-width: 768px) {
    .buttons {
        gap: 30px;
    }
    .tao-button {
        font-size: 1.3rem;
    }
}
