        
        
        /* 顏色變量 - 本頁核心配色 */
        :root {
            --primary-color: #9D2933;
            --primary-dark: #7e2129;
            --secondary-color: #F8F0E3;
            --accent-color: #DBA83F;
            --accent-dark: #c4902d;
            --text-dark: #2C3333;
            --text-light: #6c6c6c;
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
            --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
            --radius-sm: 6px;
            --radius-md: 12px;
            --radius-lg: 24px;
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        /* 顏色工具類 */
        .primary-color { color: var(--primary-color); }
        .bg-primary-color { background-color: var(--primary-color); }
        .secondary-color { color: var(--secondary-color); }
        .bg-secondary-color { background-color: var(--secondary-color); }
        .accent-color { color: var(--accent-color); }
        
        
        /* 動畫效果 - 本頁使用的核心動畫 */
        @keyframes shake {
            10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); }
            20%, 80% { transform: translate3d(2px, 0, 0) rotate(1deg); }
            30%, 50%, 70% { transform: translate3d(-3px, 0, 0) rotate(-2deg); }
            40%, 60% { transform: translate3d(3px, 0, 0) rotate(2deg); }
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes slideUp {
            from { transform: translateY(30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }
        
        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
/* 延長搖動動畫時間，與JavaScript中的3秒對應 */
.shake {
    animation: shake 0.5s infinite; /* 0.5秒一次震動，循環3秒 */
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(8deg); } /* 角度增大，搖晃更劇烈 */
    75% { transform: rotate(-8deg); }
}
        
        .pulse {
            animation: pulse 2s infinite;
        }
        
        .scroll-reveal {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }
        
        .scroll-reveal.active {
            opacity: 1;
            transform: translateY(0);
        }
        
        /* 頁頭樣式 */
        header {
            box-shadow: var(--shadow-md);
            position: relative;
            z-index: 10;
            margin-bottom: 30px;
        }
        
        
        
        /* 籤筒和籤的樣式 */
        .stick-container {
            width: 120px;
            height: 300px;
            margin: 0 40px;
            position: relative;
            perspective: 1000px;
        }
        
        .fortune-container {
    width: 120px;
    height: 300px;
    background-image: url('/img/fortune-container.png'); /* 替換為圖檔路徑 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 0; /* 移除原有圓角 */
    position: relative;
    
    overflow: hidden;
}
        
/* 移除原來的偽元素裝飾 */
.fortune-container::before,
.fortune-container::after {
    display: none;
}
        
        .container-base {
            position: absolute;
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: 140px;
            height: 20px;
            background-color: var(--accent-color);
            border-radius: 50%;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
        
        .fortune-stick {
            position: absolute;
            top: 60px;
            left: 50%;
            transform: translateX(-50%);
            width: 45px;
            height: 250px;
            background-color: transparent; /* 改為透明背景 */
            border-radius: 5px;
            box-shadow: var(--shadow-md);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 1;
            background-image: linear-gradient(
                90deg,
                rgba(0, 0, 0, 0.03) 0%,
                transparent 5%,
                transparent 95%,
                rgba(0, 0, 0, 0.03) 100%
            );
        }
        
        .stick-image {
    width: 100%;
    height: 100%;
    background-image: url('/img/stick.png'); /* 替換為你的籤支圖片路徑 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative; /* 用於文字定位 */
    display: flex;
    align-items: center;
    justify-content: center;
}

#fortuneStickText {
    /* 調整文字位置和樣式，使其更好地顯示在籤上 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg); /* 旋轉文字匹配豎向書寫 */
    width: 180px; /* 根據圖片大小調整 */
    font-size: 20px;
    color: #333; /* 可以使用深色文字確保在圖片上可見 */
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8); /* 添加文字陰影增強可讀性 */
    font-weight: bold;
    text-align: center;
}

/* 響應式調整 */
@media (max-width: 768px) {
    #fortuneStickText {
        font-size: 18px;
        width: 150px;
    }
}
        .fortune-stick span {
            display: block;
            transform: rotate(-90deg);
            width: 200px;
            text-align: center;
            font-weight: bold;
            font-size: 18px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }
        
        /* 按鈕樣式 */
        .btn-primary-custom {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 12px 36px;
            border-radius: 30px;
            font-size: 18px;
            transition: var(--transition);
            box-shadow: 0 4px 6px rgba(157, 41, 51, 0.2);
            margin: 10px 5px;
        }
        
        .btn-primary-custom:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px) scale(1.02);
            color: white;
            box-shadow: 0 6px 12px rgba(157, 41, 51, 0.3);
        }
        
        .btn-primary-custom:active {
            transform: translateY(0) scale(1);
            box-shadow: 0 2px 4px rgba(157, 41, 51, 0.2);
        }
        
        .btn-accent-custom {
            background-color: var(--accent-color);
            color: white;
            border: none;
            padding: 10px 24px;
            border-radius: 30px;
            font-size: 16px;
            transition: var(--transition);
            box-shadow: 0 4px 6px rgba(219, 168, 63, 0.2);
            margin: 10px 5px;
        }
        
        .btn-accent-custom:hover {
            background-color: var(--accent-dark);
            transform: translateY(-2px) scale(1.02);
            color: white;
            box-shadow: 0 6px 12px rgba(219, 168, 63, 0.3);
        }
        
        .btn-accent-custom:active {
            transform: translateY(0) scale(1);
            box-shadow: 0 2px 4px rgba(219, 168, 63, 0.2);
        }
        
        /* 結果區域樣式 */
        .result-container {
            border: 2px solid rgba(157, 41, 51, 0.3);
            border-radius: var(--radius-md);
            padding: 35px 25px 25px;
            position: relative;
            background-color: rgba(248, 240, 227, 0.85);
            box-shadow: var(--shadow-sm);
            transition: var(--transition);
            margin-bottom: 30px;
        }
        
        .result-container:hover {
            box-shadow: var(--shadow-md);
        }
        
        .result-title {
            position: absolute;
            top: -15px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--primary-color);
            color: white;
            padding: 0 20px;
            border-radius: 30px;
            font-size: 16px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        /* 頁腳樣式 */
        .footerdiv {
            background-color: var(--primary-color);
            color: white;
            padding: 40px 0 20px;
            
            position: relative;
            overflow: hidden;
        }
        
        .footerdiv::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 10px;
            background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--accent-color));
            background-size: 200% 100%;
            animation: gradientShift 15s ease infinite;
        }
        
        .footerdiv-icon {
            font-size: 24px;
            margin: 0 10px;
            color: white;
            transition: var(--transition);
        }
        
        .footerdiv-icon:hover {
            color: var(--accent-color);
            transform: translateY(-3px);
        }
        
        /* 卡片容器樣式 */
        .card-container {
            background: white;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            overflow: hidden;
            transition: var(--transition);
            margin-bottom: 40px;
        }
        
        .card-container:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-5px);
        }
        
        .card-header {
            background-color: var(--primary-color);
            height: 4px;
        }
        
        /* 排版樣式 */
        h2.chinese-font {
            letter-spacing: 0.5px;
            position: relative;
            display: inline-block;
            margin-bottom: 30px;
        }
        
        /* 步驟指示器樣式 */
        .steps-indicator {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
            position: relative;
            padding: 10px 0;
        }
        
        .steps-indicator::before {
            content: '';
            position: absolute;
            top: 28px;
            left: 15%;
            right: 15%;
            height: 2px;
            background-color: #e0d8c8;
            z-index: 1;
        }
        
        .step-item {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            background-color: #e0d8c8;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 15px;
            position: relative;
            z-index: 2;
            transition: all 0.3s ease;
            font-weight: bold;
        }
        
        .step-item.active {
            background-color: var(--primary-color);
            transform: scale(1.1);
        }
        
        .step-item.completed {
            background-color: var(--accent-color);
        }
        
        .step-label {
            position: absolute;
            top: 40px;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            font-size: 14px;
            color: var(--text-light);
        }
        
        .step-item.active .step-label,
        .step-item.completed .step-label {
            color: var(--primary-color);
            font-weight: bold;
        }
        
        /* 祈禱輸入區域樣式調整 */
        .prayer-container {
            margin-bottom: 30px; /* 增加底部間距 */
            animation: fadeIn 0.5s ease-out;
            padding: 0 15px; /* 增加左右內邊距 */
        }
        
        .prayer-container textarea {
            width: 100%;
            padding: 18px; /* 增加內邊距 */
            border: 1px solid #e0d8c8;
            border-radius: var(--radius-md);
            resize: none;
            min-height: 180px; /* 增加輸入框高度 */
            font-family: inherit;
            transition: all 0.3s ease;
            background-color: rgba(255, 255, 255, 0.8);
            margin-bottom: 10px; /* 增加與提示文字的距離 */
        }
        
        .prayer-container textarea:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(219, 168, 63, 0.2);
        }
        
        .prayer-hint {
            font-size: 14px;
            color: var(--text-light);
            margin-top: 10px;
            font-style: italic;
            text-align: left;
            padding: 0 10px; /* 增加內邊距 */
        }
        
        /* 步驟容器樣式調整 */
        .step-content {
            display: none;
            padding: 15px; /* 增加內邊距 */
        }
        
        .step-content.active {
            display: block;
            animation: slideUp 0.5s ease-out;
        }
        
        /* 各步驟標題調整 */
        .step-content h3 {
            margin-bottom: 30px !important;
            padding: 10px 0;
        }
        
        /* 段落間距調整 */
        .step-content p {
            margin-bottom: 25px !important;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }
        
        /* 擲筊相關樣式 */
        .jia-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 20px 0;
        }
        
        .jia-image {
            width: 120px;
            height: 120px;
            margin: 20px 0;
            transition: all 0.3s ease;
        }
        
        .sacred-count {
            margin: 15px 0;
            padding: 8px 16px;
            background-color: var(--secondary-color);
            border-radius: 20px;
            color: var(--text-dark);
            font-weight: bold;
        }
        
        .jia-buttons {
            margin-top: 10px;
        }
        
        /* 響應式改進 */
        @media (max-width: 768px) {
            .stick-container {
                width: 100px;
                height: 260px;
                margin-bottom: 30px; /* 手機端調整底部間距 */
            }
            
            .fortune-container {
                width: 100px;
                height: 260px;
            }
            
            .fortune-stick {
                width: 38px;
                height: 220px;
            }
            
            .container-base {
                width: 120px;
            }
            
            .jia-image {
                width: 100px;
                height: 100px;
            }
            
            .btn-primary-custom {
                padding: 10px 28px;
                font-size: 16px;
                margin: 8px 3px; /* 手機端按鈕間距 */
            }
            
            .steps-indicator {
                flex-wrap: wrap;
                margin-bottom: 0px;
            }
            
            .step-item {
                margin: 0 10px 30px;
            }
            
            /* 手機端整體間距調整 */
            main {
                padding: 20px 10px 0px 10px !important;
            }
            
            .result-container {
                padding: 30px 15px 20px;
            }
        }
        /* 新增提示信息样式 */
.jia-message {
    margin: 15px 0;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: rgba(157, 41, 51, 0.1);
    color: var(--primary-color);
    font-weight: bold;
    text-align: center;
    display: none; /* 默认隐藏 */
}

.jia-message.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}
    /* 新增合筊浮动动画 */
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
    
    .float-animation {
        animation: float 2s ease-in-out infinite;
    }

    /* 签筒和掷筊区并排布局 */
@media (min-width: 768px) {
.stick-container {
        margin-bottom: 0;
    }
    
    .jia-container {
        min-width: 150px;
    }
    
    /* 减小大屏幕下的间距 */
    .d-flex.flex-wrap {
        gap: 2rem !important; /* 从8调整为2rem，可根据需要微调 */
    }
}

/* 小屏幕设备保持上下布局 */
@media (max-width: 767px) {
    .d-flex.flex-wrap {
        flex-direction: column;
        gap: 30px !important; /* 增加上下间距 */
    }
}
.msgbod{
    font-weight:bold;
    color: #0000ff;
}
/* 稟報類型選擇樣式 */
.prayer-type-container {
    margin-bottom: 30px;
}

.prayer-type-title {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: bold;
}

.prayer-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.prayer-type-card {
    background-color: white;
    border: 2px solid #e0d8c8;
    border-radius: var(--radius-md);
    padding: 20px 15px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.prayer-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
    transition: var(--transition);
}

.prayer-type-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.prayer-type-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(157, 41, 51, 0.03);
}

.prayer-type-card.selected::before {
    background-color: var(--primary-color);
}

.prayer-type-card input {
    display: none;
}

.prayer-type-icon {
    color: var(--accent-color);
    font-size: 24px;
    margin-bottom: 12px;
}

.prayer-type-card.selected .prayer-type-icon {
    color: var(--primary-color);
}

.prayer-type-name {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.prayer-type-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* 新增籤詩樣式 */
.fortune-poem-container {
    position: relative;
    margin: 30px auto;
    padding: 30px 20px;
    max-width: 80%;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
}

.fortune-poem {
    font-size: 24px; /* 加大字體 */
    font-weight: bold; /* 加粗 */
    line-height: 2; /* 增加行高 */
    color: var(--text-dark);
    text-align: center;
    letter-spacing: 2px; /* 增加字距 */
    font-family: "Noto Serif SC", serif; /* 使用更典雅的字體 */
    margin: 0;
    padding: 10px 0;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .fortune-poem {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .fortune-poem-container {
        max-width: 95%;
        padding: 20px 15px;
    }
}