        :root {
            --warm-bg: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); 
            --wheel-border: #ffffff;
            --pointer-color: #ff4757;
            --btn-color: #ffa502;
            --btn-hover: #ff7f50;
        }

        body {
            margin: 0;
            padding: 0;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: linear-gradient(to bottom, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
            font-family: "Microsoft JhengHei", sans-serif;
            overflow: hidden;
        }

        h1 {

            color: #fff;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
            font-size: 1.8rem;
            margin-bottom: 20px;
        }

        .wheel-wrapper {
            position: relative;
            width: 90vw;
            max-width: 480px;
            aspect-ratio: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 30px;
        }

        .pointer {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 40px;
            background: var(--pointer-color);
            clip-path: polygon(100% 0, 50% 100%, 0 0);
            z-index: 20;
            filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
        }

        .wheel-border {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 10px solid #fff;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            overflow: hidden;
            background: #fff;
            position: relative;
        }

        .wheel {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            position: relative;
            /* 這裡不設 transition，由 JS 動態控制 */
        }

        /* 修改數字顯示位置和樣式 */
        .segment-text {
            position: absolute;
            top: 0;
            left: 50%;
            width: 2px; /* 極細的軸心 */
            height: 50%;
            transform-origin: 50% 100%; /* 以底部（圓心）為旋轉軸 */
            display: flex;
            justify-content: center;
            align-items: flex-start; /* 讓數字從頂部開始 */
            padding-top: 5px; /* 減少內邊距，讓數字更靠近邊緣 */
            font-size: 11px; /* 稍微增大字體 */
            font-weight: bold;
            color: #333;
            pointer-events: none;
        }
        
        /* 數字顯示優化 */
        .segment-text span {
            background: rgba(255, 255, 255, 0.9);
            padding: 3px 5px;
            border-radius: 8px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transform: rotate(90deg); /* 旋轉數字使其朝向圓心 */
            margin-top: 5px; /* 調整與圓心的距離 */
            min-width: 20px;
            text-align: center;
            white-space: nowrap;
        }

        .center-circle {
            position: absolute;
            width: 120px; /* 增大寬度以容納更多文字 */
            height: 120px; /* 增大高度以容納更多文字 */
            background: #fff;
            border-radius: 50%;
            z-index: 10;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 15px; /* 增加內邊距 */
        }
        
        /* 中心顯示今日結果的樣式 */
        .center-circle .result-content {
            text-align: center;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }
        
        .center-circle .result-number {
            font-size: 22px; /* 增大數字字體 */
            font-weight: bold;
            color: #ff4757;
            margin-bottom: 3px;
            line-height: 1.2;
        }
        
        .center-circle .result-hexagram {
            font-size: 16px; /* 調整卦象字體 */
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;

            line-height: 1.2;
        }
        
        .center-circle .result-explain {
            font-size: 12px; /* 解釋文字適當大小 */
            color: #666;
            line-height: 1.3;
            max-height: 50px; /* 限制高度 */
            overflow-y: auto; /* 如果文字過多可以滾動 */
            padding: 0 5px;
            text-align: center;
            width: 100%;
            word-break: break-word;
        }
        
        /* 預設文字樣式 */
        #centerText {
            font-size: 20px;
            font-weight: bold;
            color: #ff4757;
            text-align: center;
            padding: 10px;
        }

        #spinBtn {
            padding: 15px 60px;
            font-size: 1.4rem;
            border: none;
            border-radius: 50px;
            background-color: var(--btn-color);
            color: white;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.2s, background 0.2s;
            font-weight: bold;
        }

        #spinBtn:hover {
            transform: scale(1.05);
            background-color: var(--btn-hover);
        }

        #spinBtn:disabled {
            background-color: #bdc3c7;
            cursor: not-allowed;
            transform: none;
        }

        /* 彈窗樣式 */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
            z-index: 100;
        }

        .modal.show {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-box {
            background: white;
            padding: 30px 50px;
            border-radius: 20px;
            text-align: center;
            transform: scale(0.8);
            transition: transform 0.3s;
            max-width: 90%;
            max-height: 90%;
            overflow-y: auto;
        }

        .modal.show .modal-box {
            transform: scale(1);
        }

        .result-num {
            font-size: 5rem;
            color: var(--pointer-color);
            font-weight: bold;
            display: block;
            margin: 10px 0;
        }

        /* 彈窗中的解釋文字樣式 */
        .modal-explain {
            margin-top: 20px;
            padding: 15px;
            background-color: #f9f9f9;
            border-radius: 10px;
            font-size: 16px;
            color: #333;
            line-height: 1.5;
            text-align: left;
            max-height: 200px;
            overflow-y: auto;
        }

        /* 倒數計時樣式 */
        .countdown {
            margin-top: 15px;
            padding: 12px 25px;
            background-color: rgba(0, 0, 0, 0.7);
            border-radius: 25px;
            font-size: 1rem;
            color: #FFD700;
            text-shadow: 0 1px 3px rgba(0,0,0,0.8);
            font-weight: bold;
            border: 2px solid #FFD700;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            animation: pulse 2s infinite;
            backdrop-filter: blur(5px);
        }
        
        .countdown span.highlight {
            color: #FF6B6B;
            font-weight: 900;
            text-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
        }
        
        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6);
                transform: scale(1);
            }
            50% {
                transform: scale(1.02);
            }
            70% {
                box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
                transform: scale(1);
            }
        }
        
        .countdown.hidden {
            display: none;
        }

