/* 基礎樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
}

/* 簡化背景 */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    opacity: 0.1;
}

/* 主容器 - 手機優化 */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
}

/* 天命卡懸浮按鈕 */
.destiny-card-float {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.destiny-card-btn {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.destiny-card-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.destiny-card-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 冷卻狀態 */
.destiny-card-btn.cooldown {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
    cursor: not-allowed;
    opacity: 0.7;
}

.destiny-card-btn.cooldown:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
}

.card-icon {
    font-size: 24px;
    margin-bottom: 2px;
    z-index: 2;
    position: relative;
}

.card-text {
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 2;
    position: relative;
}

.card-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e, #ff6b6b);
    opacity: 0.3;
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

.card-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 107, 0.6);
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes glow-pulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

.cooldown-timer {
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(5px);
    min-width: 60px;
}

/* 天命卡模態框樣式 */
.destiny-card-modal {
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.destiny-card-modal .modal-body {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.card-container {
    position: relative;
    width: 100%;
    height: 650px;
    perspective: 1000px;
    margin: 15px 0;
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    backface-visibility: hidden;
    transition: transform 0.6s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(0deg);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-back:hover {
    transform: rotateY(0deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.card-back-design {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.mystical-symbol {
    font-size: 48px;
    margin-bottom: 10px;
    animation: mystical-rotate 3s linear infinite;
}

.card-back-text {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Lottie動畫容器準備 */
.card-back-lottie {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
}

@keyframes mystical-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card-front {
    background: white;
    transform: rotateY(180deg);
    padding: 25px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.card-type {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.card-id {
    color: #666;
    font-size: 12px;
    font-weight: bold;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.card-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
}

.card-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    flex: 1;
}

.card-option {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.card-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.card-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.card-option-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.card-option-result {
    font-size: 14px;
    color: #666;
}

.card-option.selected .card-option-result {
    color: rgba(255, 255, 255, 0.9);
}

/* 卡片操作區域 */
.card-actions {
    text-align: center;
    margin-top: 15px;
}

.card-instruction {
    font-size: 16px;
    color: white;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 25px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: none;
}

.card-instruction:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.card-instruction.disabled {
    background: transparent;
    color: #666;
    cursor: default;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 10px 0;
}

/* 卡片翻轉動畫 */
.card-flipped .card-back {
    transform: rotateY(180deg);
}

.card-flipped .card-front {
    transform: rotateY(0deg);
}

/* 屬性變動小通知彈窗 */
.attribute-change-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    animation: notification-slide-in 0.4s ease-out;
}

.popup-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 400px;
    min-width: 320px;
    position: relative;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 24px 24px 0 0;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-close:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.popup-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.attribute-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attribute-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.attribute-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08), rgba(76, 175, 80, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.attribute-item.positive::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(76, 175, 80, 0.05));
}

.attribute-item.negative::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.12), rgba(244, 67, 54, 0.05));
}

.attribute-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.attribute-item.positive {
    border-color: rgba(76, 175, 80, 0.2);
}

.attribute-item.negative {
    border-color: rgba(244, 67, 54, 0.2);
}

.attr-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 16px;
    min-width: 60px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.attr-values {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.current-value {
    font-size: 16px;
    font-weight: 500;
    color: #718096;
    background: rgba(113, 128, 150, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 40px;
    text-align: center;
    border: 1px solid rgba(113, 128, 150, 0.1);
}

.arrow {
    font-size: 14px;
    color: #a0aec0;
    font-weight: 600;
}

.new-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    background: rgba(26, 32, 44, 0.08);
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 40px;
    text-align: center;
    border: 1px solid rgba(26, 32, 44, 0.1);
}

.change-value {
    font-size: 16px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 50px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.change-value.positive {
    color: #2d7d32;
    background: linear-gradient(135deg, rgba(45, 125, 50, 0.15), rgba(45, 125, 50, 0.08));
    border: 1px solid rgba(45, 125, 50, 0.2);
}

.change-value.negative {
    color: #d32f2f;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.15), rgba(211, 47, 47, 0.08));
    border: 1px solid rgba(211, 47, 47, 0.2);
}

@keyframes notification-slide-in {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes notification-slide-out {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 屬性效果動畫 */
.attribute-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    z-index: 2000;
    pointer-events: none;
    animation: attribute-float 2s ease-out forwards;
}

.attribute-effect.positive {
    color: #4CAF50;
}

.attribute-effect.negative {
    color: #f44336;
}

@keyframes attribute-float {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(1.2);
    }
}

/* 天命卡手機響應式設計 */
@media screen and (max-width: 480px) {
    .destiny-card-float {
        top: 70%;
        right: 15px;
        transform: translateY(-50%);
    }
    
    
    .destiny-card-btn {
        width: 70px;
        height: 70px;
        border-radius: 50%;
    }
    
    .card-icon {
        font-size: 18px;
    }
    
    .card-text {
        font-size: 10px;
    }
    
    .cooldown-timer {
        margin-top: 3px;
        padding: 1px 6px;
        font-size: 9px;
        min-width: 50px;
    }
    
    .destiny-card-modal {
        width: 98%;
        max-height: 95vh;
    }
    
    .card-container {
        height: 550px;
        margin: 15px 0;
    }
    
    .card-front {
        padding: 20px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-description {
        font-size: 14px;
    }
    
    .card-options {
        flex: 1;
    }
    
    .card-option {
        padding: 10px 12px;
    }
    
    /* 手機版屬性通知彈窗 */
    .attribute-change-popup {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 92%;
        width: 92%;
    }
    
    .popup-content {
        max-width: none;
        padding: 16px;
        border-radius: 20px;
    }
    
    .popup-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .attribute-list {
        gap: 10px;
    }
    
    .attribute-item {
        padding: 14px 16px;
        flex-direction: row;
        gap: 8px;
        text-align: left;
    }
    
    .attr-name {
        font-size: 15px;
        min-width: 50px;
        text-align: left;
    }
    
    .attr-values {
        justify-content: center;
        gap: 6px;
    }
    
    .current-value {
        font-size: 14px;
        padding: 4px 8px;
        min-width: 35px;
    }
    
    .arrow {
        font-size: 12px;
    }
    
    .new-value {
        font-size: 16px;
        padding: 4px 8px;
        min-width: 35px;
    }
    
    .change-value {
        font-size: 14px;
        padding: 6px 10px;
        min-width: 45px;
    }
}

/* 手機響應式設計 */
@media screen and (max-width: 480px) {
    .app-container {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    .logs-page {
        padding: 0.5rem;
        overflow-x: hidden;
    }
    
    .logs-filters .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* 手機版曆法信息 */
    .calendar-info {
        padding: 0.6rem 1rem;
        font-size: 16px; /* 保持16px避免iOS放大 */
    }
    
    .calendar-display {
        gap: 0.4rem;
    }
    
    .calendar-row {
        gap: 0.3rem;
        flex-wrap: wrap;
    }
    
    .calendar-item {
        gap: 0.2rem;
    }
    
    .calendar-item .label {
        font-size: 16px; /* 保持16px避免iOS放大 */
        transform: scale(0.65); /* 視覺縮小到0.65倍 */
        transform-origin: left center;
    }
    
    .calendar-item .value {
        font-size: 16px; /* 保持16px避免iOS放大 */
        transform: scale(0.75); /* 視覺縮小到0.75倍 */
        transform-origin: left center;
    }
    
    .calendar-separator {
        font-size: 16px; /* 保持16px避免iOS放大 */
        transform: scale(0.7); /* 視覺縮小到0.7倍 */
        transform-origin: center;
    }
    
    .ganzhi-row {
        margin-top: 0.2rem;
        padding-top: 0.2rem;
    }
    
    body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }
    
    /* 修正手機版header覆蓋問題 - 已移至下方統一管理 */
    
    .status-bar {
        height: 25px; /* 增加高度 */
        font-size: 16px; /* 保持16px避免iOS放大 */
        transform: scale(0.7); /* 視覺縮小到0.7倍 */
        transform-origin: left center;
        padding: 0 0.8rem;
    }
    
    .top-header {
        top: 25px; /* 對應狀態欄高度 */
        height: 50px; /* 保持header高度 */
    }
}

/* 頂部狀態欄 */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.75); /* 視覺縮小到0.75倍 */
    transform-origin: left center;
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #4CAF50;
}

.status-text {
    color: rgba(255, 255, 255, 0.9);
}

.status-time {
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 為固定header和狀態欄預留空間 - 已移至下方統一管理 */

/* 固定頂部Header */
.top-header {
    position: fixed;
    top: 24px; /* 在狀態欄下方 */
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
    height: 50px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* 左側境界徽章 */
.realm-badge {
    flex-shrink: 0;
}

.realm-badge span {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.9); /* 視覺縮小到0.9倍 */
    transform-origin: center;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* 中間統計區域 */
.stats-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin: 0 1rem;
}

/* 經驗條 */
.exp-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7); /* 視覺縮小到0.7倍 */
    font-size: 16px; /* 保持16px避免iOS放大 */
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 屬性行 */
.attributes-row {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.attr-stat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
}

.attr-icon {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
}

.attr-value {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.75); /* 視覺縮小到0.75倍 */
    transform-origin: center;
    font-weight: 600;
    color: white;
    min-width: 1.5rem;
    text-align: center;
}

/* Tooltip效果 */
.attr-stat::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.7); /* 視覺縮小到0.7倍 */
    font-size: 16px; /* 保持16px避免iOS放大 */
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 0.3rem;
}

.attr-stat::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: -0.1rem;
}

.attr-stat:hover::before,
.attr-stat:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 右側菜單 */
.header-menu {
    position: relative;
    flex-shrink: 0;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.menu-panel {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    margin-top: 0.5rem;
    overflow: hidden;
    z-index: 1001;
}

.menu-user {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    color: #667eea;
    font-weight: 600;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.85); /* 視覺縮小到0.85倍 */
    transform-origin: left center;
    border-bottom: 1px solid #eee;
}

.menu-actions {
    display: flex;
    flex-direction: column;
}

.menu-action {
    background: none;
    border: none;
    padding: 0.6rem 1rem;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.85); /* 視覺縮小到0.85倍 */
    transform-origin: left center;
    text-align: left;
}

.menu-action:hover {
    background: #f5f5f5;
}

.realm-name {
    font-size: 1.2rem;
    font-weight: bold;
}

.spiritual-path {
    font-size: 0.9rem;
    opacity: 0.9;
}

.progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 120px;
}

.progress-label {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
    opacity: 0.9;
}

.progress-bar {
    width: 200px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    max-width: 100%;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
    font-weight: bold;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

/* 主內容區域 */
.main-content {
    padding: 1rem;
    padding-bottom: 120px; /* 增加底部padding，為底部導航留出更多空間 */
}

/* 進行中的任務 */
.active-tasks {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    color: white !important;
    max-height: 280px;
    overflow: hidden;
    border: none !important; /* 確保沒有邊框 */
}

.active-tasks .card-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none !important; /* 移除通用樣式的底邊框 */
    padding-bottom: 0 !important; /* 移除通用樣式的底內邊距 */
    background: transparent !important; /* 確保沒有白色背景 */
}

.active-tasks .card-header h2 {
    color: white !important;
    margin: 0 !important;
    font-size: 1.2rem;
    font-weight: 600;
    background: transparent !important; /* 確保沒有白色背景 */
}

.task-count {
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.9); /* 視覺縮小到0.9倍 */
    transform-origin: center;
    font-weight: 500;
    color: white !important;
}

.active-tasks .card-content {
    color: white !important;
    padding: 0 !important; /* 移除通用樣式的內邊距 */
    background: transparent !important; /* 確保沒有白色背景 */
}

.tasks-scroll-container {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
    background: transparent !important; /* 確保沒有白色背景 */
}

.tasks-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.tasks-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.tasks-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.tasks-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.tasks-list {
    margin-bottom: 0;
    background: transparent !important; /* 確保沒有白色背景 */
}

.active-tasks .task-item {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    padding: 0.8rem;
    margin-bottom: 0.6rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.task-item.expanded {
    background: rgba(255, 255, 255, 0.2);
}

.active-tasks .task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.active-tasks .task-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
    margin-right: 0.5rem;
}

.active-tasks .task-status-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.75); /* 視覺縮小到0.75倍 */
    transform-origin: center;
    font-weight: 500;
    white-space: nowrap;
}

.active-tasks .task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.85); /* 視覺縮小到0.85倍 */
    transform-origin: left center;
    color: rgba(255, 255, 255, 0.8);
}

.task-duration {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.9); /* 視覺縮小到0.9倍 */
    transform-origin: left center;
    color: rgba(255, 255, 255, 0.8);
}

.task-remaining-time {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.9); /* 視覺縮小到0.9倍 */
    transform-origin: left center;
    color: #ffd700;
    font-weight: 600;
}

.task-description {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.9); /* 視覺縮小到0.9倍 */
    transform-origin: left top;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.active-tasks .task-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.active-tasks .task-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.task-actions .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.task-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.task-actions .btn-danger {
    background: rgba(220, 53, 69, 0.8);
    border: 1px solid rgba(220, 53, 69, 0.9);
    color: white;
}

.task-actions .btn-danger:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-1px);
}

/* 新增任務按鈕樣式 */
.task-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-align: center;
    display: block;
    width: 100%;
}

.task-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 模態框中的任務操作按鈕樣式 */
#taskModal .task-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 0;
}

#taskModal .task-actions .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    cursor: pointer;
}

#taskModal .task-actions .btn-primary {
    background: #007bff;
    border: 1px solid #007bff;
    color: white;
}

#taskModal .task-actions .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

#taskModal .task-actions .btn-secondary {
    background: #6c757d;
    border: 1px solid #6c757d;
    color: white;
    margin-top: 0;
    display: inline-block;
    width: auto;
}

#taskModal .task-actions .btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 任務詳情模態窗格樣式 */
#taskModal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

#taskModal .modal-body {
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.task-detail-info {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.detail-value {
    color: #666;
    text-align: right;
}

.task-description-section {
    margin-top: 1.5rem;
}

.task-description-section h4 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.task-description-text {
    color: #666;
    line-height: 1.6;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    max-height: 200px;
    overflow-y: auto;
    word-wrap: break-word;
    word-break: break-word;
}

.task-description-text::-webkit-scrollbar {
    width: 6px;
}

.task-description-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.task-description-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.task-description-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.task-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.task-status.pending {
    background: #e3f2fd;
    color: #1976d2;
}

.task-status.in-progress {
    background: #ffebee;
    color: #d32f2f;
}

.task-status.completed {
    background: #e8f5e8;
    color: #2e7d32;
}

/* 今日事件卡 */
.today-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.today-card .card-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.today-card .card-header h2 {
    text-align: center !important;
    margin: 0 !important;
    width: 100%;
}

/* 今日詩籤 - 紫色漸變設計 (Purple Gradient Design) */
.daily-wisdom-card {
    /* 核心容器：紫色漸變背景，與進行中的修煉一致 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; /* 紫色漸變背景 */
    border-radius: 16px; /* 柔和圓角 */
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3), /* 紫色陰影 */
        0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 1.5rem auto; /* 居中並增加上下間距 */
    max-width: 400px; /* 限制最大寬度，適合內容呈現 */
    overflow: hidden;
    border: none !important; /* 移除邊框 */
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white !important; /* 白色文字 */
}

.daily-wisdom-card:hover {
    /* Hover效果：輕微抬升，增加深度 */
    transform: translateY(-3px);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.1);
}


/* --- 標題區域：與主背景融合 --- */
.daily-card-header {
    /* 與主背景融合，增加透明度和層次 */
    background: rgba(255, 255, 255, 0.1); /* 半透明白色覆蓋 */
    color: white;
    padding: 1.5rem 1.5rem 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    position: relative;
    z-index: 3;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* 微妙分隔線 */
}

.daily-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.daily-wisdom-icon {
    /* Icon：簡化、實心白 */
    font-size: 1.8rem;
    color: #f1f5f9; /* 輕微的暖白，避免刺眼 */
    filter: none; /* 移除過度發光 */
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.daily-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.daily-wisdom-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff ;
    letter-spacing: 0.2px;
}

.daily-wisdom-subtitle {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7) !important;
    font-style: normal; /* 移除斜體，更正式 */
    letter-spacing: 0.1px;
}

/* 刷新按鈕：與紫色背景協調的設計 */
.daily-refresh-btn {
    background: rgba(255, 255, 255, 0.2); /* 半透明白色背景 */
    color: white; /* 白色文字 */
    border: 1px solid rgba(255, 255, 255, 0.3); /* 半透明邊框 */
    border-radius: 9999px; /* 完全圓形膠囊 */
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: none;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.daily-refresh-btn::before {
    /* 移除閃光動畫 */
    display: none;
}

.daily-refresh-icon {
    font-size: 1.2rem;
    animation: none; /* 移除過度動畫 */
    filter: none;
    color: #64748b;
}

.daily-refresh-text {
    font-size: 0.85rem;
    letter-spacing: 0.2px;
    text-transform: capitalize; /* 正常大小寫 */
    font-weight: 700;
}

.daily-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3); /* 更亮的半透明背景 */
    border-color: rgba(255, 255, 255, 0.5); /* 更亮的邊框 */
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.daily-refresh-btn:hover .daily-refresh-icon {
    animation: simpleRotation 0.8s; /* 輕微旋轉動畫 */
    filter: none;
}

@keyframes simpleRotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 詩籤內容區域：簡潔的資訊分層 --- */
.daily-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: transparent;
    border-radius: 0;
}

.daily-wisdom-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 卷軸容器 - 簡潔化為內容區 */
.daily-wisdom-scroll {
    /* 徹底移除卷軸樣式，融入卡片主體 */
    margin: 0;
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    width: 100%;
    box-sizing: border-box;
    isolation: auto;
}

.daily-wisdom-scroll::before,
.daily-wisdom-scroll::after {
    /* 移除所有邊框和內發光動畫 */
    display: none;
}

.daily-wisdom-scroll:hover {
    transform: none;
    box-shadow: none;
}

/* 內容區塊標題：統一風格，低調分隔 */
.daily-wisdom-excerpt-title,
.daily-wisdom-principle-title,
.daily-wisdom-notes-title,
.daily-wisdom-source-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95); /* 更亮的白色文字，提高清晰度 */
    margin-bottom: 0.5rem;
    padding-left: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-left: 3px solid rgba(255, 255, 255, 0.6); /* 更亮的左側強調線 */
    padding-left: 0.5rem;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 添加文字陰影提高可讀性 */
}

/* 分隔線：簡潔單線 */
.section-divider {
    height: 1px;
    background: #e2e8f0; /* 淺灰線 */
    margin: 1.5rem 0;
}

.section-divider::after {
    /* 移除特殊圖案 */
    display: none;
}

/* 詩籤文字 (Quote) */
.daily-wisdom-excerpt {
    font-size: 1.3rem;
    line-height: 2; /* 增加行距，更舒適閱讀 */
    color: #ffffff; /* 純白色文字，提高對比度 */
    font-weight: 600; /* 增加字重，提高可讀性 */
    text-align: justify;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.15); /* 更亮的半透明白色背景 */
    border-radius: 12px;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.3), /* 更亮的邊框 */
        0 2px 8px rgba(0, 0, 0, 0.1); /* 添加外陰影增加層次 */
    word-spacing: 0.1em;
    text-indent: 0; /* 移除首行縮進，現代排版習慣 */
    min-height: auto;
    border-left: 6px solid rgba(255, 255, 255, 0.6); /* 更亮的左側邊框 */
    position: relative;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* 添加文字陰影提高可讀性 */
}

.daily-wisdom-excerpt::after {
    /* 移除閃爍的裝飾 */
    display: none;
}

/* 原理與註釋：與紫色背景協調的資訊區塊 */
.daily-wisdom-principle,
.daily-wisdom-notes {
    font-size: 1rem;
    line-height: 1.7;
    color: #ffffff; /* 純白色文字，提高對比度 */
    font-weight: 500; /* 增加字重，提高可讀性 */
    text-align: left; /* 左對齊，更自然 */
    margin: 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15); /* 更亮的半透明白色背景 */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 添加陰影增加層次 */
    border: 1px solid rgba(255, 255, 255, 0.3); /* 更亮的邊框 */
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.2px;
    word-spacing: 0.05em;
    transform: none; /* 移除縮放效果 */
    transition: all 0.3s ease;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加文字陰影提高可讀性 */
}

.daily-wisdom-principle:hover,
.daily-wisdom-notes:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.4); /* 更亮的邊框 */
    background: rgba(255, 255, 255, 0.15); /* 更亮的背景 */
}

/* 來源：簡潔的文字呈現 */
.daily-wisdom-source {
    display: flex; /* 讓其居左 */
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    transition: none;
    text-align: left;
    margin: 0.5rem 0 0 0;
}

.daily-wisdom-source:hover {
    transform: none;
    box-shadow: none;
}

.daily-source-icon {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8); /* 半透明白色，與背景協調 */
    filter: none;
    animation: none;
}

.daily-wisdom-name {
    font-size: 0.95rem;
    color: #ffffff; /* 純白色文字，提高對比度 */
    font-weight: 600;
    letter-spacing: 0.2px;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加文字陰影提高可讀性 */
}

/* 底部祝福語：與紫色背景協調的結尾 */
.daily-wisdom-blessing {
    padding: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
    margin: 0;
    border-radius: 0 0 16px 16px; /* 與卡片圓角銜接 */
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); /* 半透明上方邊線分隔 */
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    position: relative;
    z-index: 2;
}

.daily-wisdom-blessing::before {
    /* 移除發光動畫 */
    display: none;
}

.daily-blessing-text {
    color: #ffffff; /* 純白色文字，提高對比度 */
    font-size: 1rem;
    font-weight: 600; /* 增加字重，提高可讀性 */
    letter-spacing: 0.3px;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* 添加文字陰影提高可讀性 */
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

/* --- 曆法資訊：與紫色背景協調 --- */
.daily-calendar-info {
    background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
    padding: 1.2rem 1.5rem;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* 半透明頂部邊框 */
    font-size: 15px;
    color: white; /* 白色文字 */
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
}

.daily-calendar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.9); /* 更亮的白色文字 */
    font-size: 0.9rem;
    font-weight: 500;
}

.daily-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calendar-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 兩欄佈局 */
    gap: 0.6rem 0.8rem;
}

.calendar-row {
    display: contents; /* 讓子元素直接放入 grid */
}

.calendar-item {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 左對齊 */
    gap: 0.4rem;
    background: none; /* 移除背景、邊框、濾鏡 */
    padding: 0;
    border: none;
    backdrop-filter: none;
}

.calendar-item .label {
    font-size: 0.9rem;
    transform: none; /* 移除縮放 */
    color: rgba(255, 255, 255, 0.9); /* 更亮的半透明白色 */
    font-weight: 500;
    min-width: 40px; /* 最小寬度對齊 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加文字陰影 */
}

.calendar-item .value {
    font-size: 1rem;
    transform: none; /* 移除縮放 */
    color: #ffffff; /* 純白色文字 */
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 添加文字陰影 */
}

.calendar-separator {
    display: none; /* 移除分隔符 */
}

.ganzhi-row {
    grid-column: 1 / -1; /* 跨越兩欄 */
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.3); /* 半透明虛線分隔 */
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.calendar-item .lunar-date,
.calendar-item .ganzhi,
.calendar-item .term,
.calendar-item .animal {
    font-weight: 700;
    color: white; /* 白色文字 */
}

/* --- 加載與錯誤狀態：簡潔化 --- */
.daily-wisdom-loading {
    padding: 3rem 1.5rem;
    gap: 1.5rem;
}

.daily-meditation-icon {
    font-size: 3rem;
    animation: simpleBreathe 3s ease-in-out infinite; /* 簡化動畫 */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    background: none;
    -webkit-text-fill-color: white;
    background-clip: unset;
    color: white; /* 白色文字 */
}

.daily-meditation-icon::before {
    /* 移除複雜光環 */
    display: none;
}

.daily-loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: white; /* 白色文字 */
    -webkit-text-fill-color: white;
    background-clip: unset;
    background: none;
}

.daily-loading-dots span {
    background: white; /* 白色點 */
    box-shadow: none;
    animation: simplePulse 1.5s ease-in-out infinite;
}

@keyframes simpleBreathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes simplePulse {
    0%, 100% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
}

.daily-wisdom-error-content {
    padding: 2.5rem 1.5rem;
}

.daily-error-icon {
    font-size: 2.5rem;
    color: #ff6b6b; /* 更亮的紅色，在紫色背景上更明顯 */
    filter: none;
    animation: none;
}

.daily-error-guidance {
    background: rgba(255, 107, 107, 0.2); /* 半透明紅色背景 */
    border: 1px solid rgba(255, 107, 107, 0.4); /* 半透明紅色邊框 */
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
}

.daily-guidance-text {
    color: white; /* 白色文字 */
    font-weight: 600;
}

/* --- 手機版樣式調整 --- */
@media screen and (max-width: 480px) {
    .daily-wisdom-card {
        margin: 1rem 0.5rem;
        border-radius: 12px;
        background: #667eea !important; /* 純色背景，移除漸變 */
        color: white !important; /* 確保白色文字 */
    }
    
    .daily-card-header {
        padding: 1.2rem;
        border-radius: 12px 12px 0 0;
    }
    
    .daily-wisdom-title {
        font-size: 1.4rem;
        color: #ffffff ; /* 確保白色文字 */
    }
    
    .daily-wisdom-subtitle {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 1) ; /* 確保半透明白色文字 */
    }
    
    .daily-refresh-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .daily-wisdom-content {
        padding: 1.2rem;
        gap: 1.2rem;
    }

    .daily-wisdom-excerpt {
        font-size: 1.1rem;
        line-height: 1.8;
        padding: 1.2rem;
    }
    
    .calendar-display {
        grid-template-columns: 1fr; /* 單欄佈局 */
        gap: 0.5rem 0;
    }

    .ganzhi-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

.calendar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    color: #475569;
    font-weight: 600;
    padding: 1rem 0;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 4px solid rgba(99, 102, 241, 0.15);
    border-top: 4px solid rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    animation: divineSpinner 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid transparent;
    border-top: 2px solid rgba(168, 85, 247, 0.6);
    border-radius: 50%;
    animation: divineSpinner 2s linear infinite reverse;
}

@keyframes divineSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calendar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.calendar-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.calendar-item .label {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.75); /* 視覺縮小到0.75倍 */
    transform-origin: left center;
    color: #64748b;
    font-weight: 500;
}

.calendar-item .value {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.85); /* 視覺縮小到0.85倍 */
    transform-origin: left center;
    color: #1e293b;
    font-weight: 600;
}

.calendar-separator {
    color: #94a3b8;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
    font-weight: 500;
    margin: 0 0.2rem;
}

.ganzhi-row {
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.calendar-item .lunar-date {
    color: #7c3aed;
    font-weight: 700;
}

.calendar-item .ganzhi {
    color: #dc2626;
    font-weight: 700;
}

.calendar-item .term {
    color: #059669;
    font-weight: 700;
}

.calendar-item .animal {
    color: #ea580c;
    font-weight: 700;
}

/* 詩籤標題文字 - 已移至 .daily-wisdom-title */

/* 刷新按鈕 - 已移至 .daily-refresh-btn */

@keyframes sacredPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7));
    }
    50% { 
        transform: scale(1.15) rotate(5deg);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    }
}

@keyframes divineRotation {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(90deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    75% { transform: scale(1.3) rotate(270deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* 詩籤內容區域 - 透明容器 */

/* 經典內容卡片 - 現代設計 */
.wisdom-quote {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0.5rem 0.3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.wisdom-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

.wisdom-quote:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 經典文字內容 */
.wisdom-excerpt {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #1e293b;
    margin-bottom: 1.2rem;
    font-style: normal;
    text-align: left;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* 來源信息 - 現代設計 */
.wisdom-source {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    margin: 0 0.3rem 0.5rem 0.3rem;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.wisdom-source::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
}

.wisdom-source:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 來源名稱 */
.wisdom-name {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.95); /* 視覺縮小到0.95倍 */
    transform-origin: left center;
    color: #475569;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* 原理說明 - 現代設計 */
.wisdom-principle {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0.5rem 0.3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.98); /* 視覺縮小到0.98倍 */
    transform-origin: left top;
    color: #1e293b;
    line-height: 1.7;
    font-weight: 400;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wisdom-principle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6 0%, #d946ef 100%);
}

.wisdom-principle:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: scale(0.98) translateY(-2px);
}

/* 註釋說明 - 現代設計 */
.wisdom-notes {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0.3rem;
    border: 1px solid #e2e8f0;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.95); /* 視覺縮小到0.95倍 */
    transform-origin: left top;
    color: #475569;
    line-height: 1.6;
    font-style: normal;
    font-weight: 400;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.wisdom-notes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d946ef 0%, #f59e0b 100%);
}

.wisdom-notes:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    transform: scale(0.95) translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 詩籤卷軸容器 - 專業重新設計 */
.wisdom-scroll {
    margin: 1.5rem 1.2rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(252, 252, 255, 0.96) 25%,
        rgba(248, 250, 252, 0.98) 75%,
        rgba(255, 255, 255, 0.95) 100%);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    box-shadow: 
        inset 0 4px 16px rgba(99, 102, 241, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 12px 32px rgba(99, 102, 241, 0.1),
        0 6px 16px rgba(0, 0, 0, 0.04);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(20px);
    width: calc(100% - 2.4rem);
    box-sizing: border-box;
    isolation: isolate;
}

.wisdom-scroll::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.4) 0%, 
        rgba(139, 92, 246, 0.3) 25%,
        rgba(168, 85, 247, 0.4) 50%,
        rgba(217, 70, 239, 0.3) 75%,
        rgba(244, 114, 182, 0.4) 100%);
    border-radius: 30px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: scrollBorderGlow 10s ease-in-out infinite;
}

.wisdom-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(217, 70, 239, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.02) 0%, transparent 70%);
    border-radius: 28px;
    pointer-events: none;
    animation: scrollInnerGlow 12s ease-in-out infinite;
}

.wisdom-scroll:hover::before {
    opacity: 1;
}

.wisdom-scroll:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 4px 16px rgba(99, 102, 241, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        0 20px 48px rgba(99, 102, 241, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.06);
}

@keyframes scrollBorderGlow {
    0%, 100% { 
        background: linear-gradient(135deg, 
            rgba(99, 102, 241, 0.4) 0%, 
            rgba(139, 92, 246, 0.3) 25%,
            rgba(168, 85, 247, 0.4) 50%,
            rgba(217, 70, 239, 0.3) 75%,
            rgba(244, 114, 182, 0.4) 100%);
    }
    33% { 
        background: linear-gradient(135deg, 
            rgba(168, 85, 247, 0.4) 0%, 
            rgba(217, 70, 239, 0.3) 25%,
            rgba(244, 114, 182, 0.4) 50%,
            rgba(99, 102, 241, 0.3) 75%,
            rgba(139, 92, 246, 0.4) 100%);
    }
    66% { 
        background: linear-gradient(135deg, 
            rgba(244, 114, 182, 0.4) 0%, 
            rgba(99, 102, 241, 0.3) 25%,
            rgba(139, 92, 246, 0.4) 50%,
            rgba(168, 85, 247, 0.3) 75%,
            rgba(217, 70, 239, 0.4) 100%);
    }
}

@keyframes scrollInnerGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 加載狀態 - 專業重新設計 */
.wisdom-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    padding: 4rem 2rem;
    color: #475569;
    position: relative;
}

.meditation-icon {
    font-size: 4rem;
    animation: transcendentMeditation 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.9) 0%, 
        rgba(139, 92, 246, 0.8) 50%,
        rgba(168, 85, 247, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.meditation-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(168, 85, 247, 0.05) 50%,
        transparent 70%);
    border-radius: 50%;
    animation: meditationAura 6s ease-in-out infinite;
    z-index: -1;
}

.loading-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, 
        #334155 0%, 
        #475569 50%,
        #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.loading-dots {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.9) 0%, 
        rgba(139, 92, 246, 0.8) 50%,
        rgba(168, 85, 247, 0.9) 100%);
    animation: transcendentPulse 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

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

/* 底部祝福語 - 專業重新設計 */
.wisdom-blessing {
    padding: 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 250, 252, 0.95) 50%,
        rgba(255, 255, 255, 0.9) 100%);
    margin: 1rem 1.2rem 1.5rem 1.2rem;
    border-radius: 24px;
    border: 2px solid transparent;
    background-clip: padding-box;
    z-index: 2;
    position: relative;
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

.wisdom-blessing::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.2) 0%, 
        rgba(139, 92, 246, 0.15) 25%,
        rgba(168, 85, 247, 0.2) 50%,
        rgba(217, 70, 239, 0.15) 75%,
        rgba(244, 114, 182, 0.2) 100%);
    border-radius: 24px;
    z-index: -1;
    animation: blessingGlow 8s ease-in-out infinite;
}

.blessing-text {
    color: #475569;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    opacity: 0.9;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, 
        #475569 0%, 
        #64748b 50%,
        #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes transcendentMeditation {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
    }
    33% { 
        transform: scale(1.08) rotate(2deg);
        filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.8));
    }
    66% { 
        transform: scale(1.05) rotate(-1deg);
        filter: drop-shadow(0 0 24px rgba(217, 70, 239, 0.7));
    }
}

@keyframes meditationAura {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.6;
    }
}

@keyframes transcendentPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.6;
        box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
    }
    50% { 
        transform: scale(1.4);
        opacity: 1;
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
    }
}

@keyframes blessingGlow {
    0%, 100% { 
        background: linear-gradient(135deg, 
            rgba(99, 102, 241, 0.2) 0%, 
            rgba(139, 92, 246, 0.15) 25%,
            rgba(168, 85, 247, 0.2) 50%,
            rgba(217, 70, 239, 0.15) 75%,
            rgba(244, 114, 182, 0.2) 100%);
    }
    50% { 
        background: linear-gradient(135deg, 
            rgba(244, 114, 182, 0.2) 0%, 
            rgba(217, 70, 239, 0.15) 25%,
            rgba(168, 85, 247, 0.2) 50%,
            rgba(139, 92, 246, 0.15) 75%,
            rgba(99, 102, 241, 0.2) 100%);
    }
}

@keyframes meditate {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
    }
    50% { 
        transform: scale(1.05) rotate(2deg);
        filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.6));
    }
}

@keyframes loadingPulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(0.8); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2); 
    }
}

/* 詩籤內容樣式 - 全新優雅設計 */
.wisdom-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
}

.wisdom-excerpt-section {
    position: relative;
    padding: 0;
    margin-bottom: 1rem;
}

.wisdom-excerpt-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* 移除醜陋的引號括號設計 */
.wisdom-quote-mark {
    display: none;
}

.wisdom-quote-mark.closing {
    display: none;
}

/* 重新設計智慧文字內容 */
.wisdom-excerpt {
    font-size: 1.4rem;
    line-height: 1.9;
    color: #1a202c;
    font-weight: 600;
    text-align: justify;
    margin: 0;
    max-width: 100%;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
    padding: 2rem 1.5rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.98) 100%);
    border-radius: 20px;
    box-shadow: 
        inset 0 2px 8px rgba(99, 102, 241, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.98) 100%);
    word-spacing: 0.1em;
    text-indent: 2em;
    min-height: 4em;
}

.wisdom-excerpt::before {
    display: none;
}

.wisdom-excerpt::after {
    content: '✨';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.2rem;
    opacity: 0.4;
    animation: gentleSparkle 3s ease-in-out infinite;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.3) 20%, 
        rgba(139, 92, 246, 0.4) 50%, 
        rgba(217, 70, 239, 0.3) 80%, 
        transparent 100%);
    margin: 1.5rem 0;
    position: relative;
}

.section-divider::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0 0.5rem;
    color: rgba(99, 102, 241, 0.6);
    font-size: 0.8rem;
}

.wisdom-principle-section,
.wisdom-notes-section {
    padding: 0.5rem 0;
}

.wisdom-principle-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.wisdom-notes-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* 重新設計原理說明區域 */
.wisdom-principle {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #2d3748;
    text-align: justify;
    font-weight: 500;
    margin: 0;
    padding: 1.8rem 1.5rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.92) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.4px;
    word-spacing: 0.1em;
    box-shadow: 
        inset 0 2px 6px rgba(139, 92, 246, 0.08),
        0 3px 12px rgba(0, 0, 0, 0.04);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.92) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    position: relative;
}

.wisdom-principle::before {
    display: none;
}

/* 重新設計註釋說明區域 */
.wisdom-notes {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a5568;
    text-align: justify;
    font-weight: 400;
    margin: 0;
    padding: 1.8rem 1.5rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.90) 0%, 
        rgba(248, 250, 252, 0.93) 100%);
    border-radius: 18px;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: 0.3px;
    word-spacing: 0.1em;
    box-shadow: 
        inset 0 2px 6px rgba(217, 70, 239, 0.08),
        0 3px 12px rgba(0, 0, 0, 0.04);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.90) 0%, 
        rgba(248, 250, 252, 0.93) 100%);
    position: relative;
    font-style: normal;
}

.wisdom-notes::before {
    display: none;
}

/* 重新設計智慧來源區域 */
.wisdom-source-section {
    text-align: center;
    padding: 1.5rem 0 1rem 0;
}

.wisdom-source-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.wisdom-source {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.98) 100%);
    padding: 1.2rem 2rem;
    border-radius: 30px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.98) 100%);
    position: relative;
    transition: all 0.4s ease;
}

.wisdom-source:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(99, 102, 241, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

.source-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
    animation: sourceIconGlow 4s ease-in-out infinite;
}

.wisdom-name {
    font-size: 1.1rem;
    color: #334155;
    font-weight: 700;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, 
        #334155 0%, 
        #475569 50%,
        #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 添加閃爍動畫 */
@keyframes gentleSparkle {
    0%, 100% { 
        opacity: 0.4; 
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.1) rotate(180deg);
    }
}

@keyframes sourceIconGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.7));
        transform: scale(1.05);
    }
}

/* 錯誤狀態樣式 */
.wisdom-error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    animation: gentleBreathe 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(217, 70, 239, 0.4));
}

.error-main-text {
    font-size: 1.3rem;
    color: #374151;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.error-sub-text {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.6;
}

.error-guidance {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, 
        rgba(217, 70, 239, 0.1) 0%, 
        rgba(99, 102, 241, 0.08) 100%);
    border-radius: 16px;
    border: 1px solid rgba(217, 70, 239, 0.2);
}

.guidance-text {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 500;
    letter-spacing: 0.3px;
}

@keyframes gentleBreathe {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(217, 70, 239, 0.4));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(217, 70, 239, 0.6));
    }
}

/* 手機版樣式 - 專業響應式設計 */
@media screen and (max-width: 480px) {
    .wisdom-card {
        border-radius: 28px;
        margin: 1rem 0.5rem 2rem 0.5rem;
        box-shadow: 
            0 12px 32px rgba(99, 102, 241, 0.1),
            0 6px 16px rgba(139, 92, 246, 0.06),
            0 3px 8px rgba(0, 0, 0, 0.03);
        background: #667eea !important; /* 純色背景，移除漸變 */
        color: white !important; /* 確保白色文字 */
    }
    
    .wisdom-card .card-header {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        border-radius: 28px 28px 0 0;
    }
    
    .header-content {
        gap: 1.2rem;
    }
    
    .wisdom-icon {
        font-size: 2.2rem;
    }
    
    .wisdom-title {
        font-size: 1.5rem !important;
        letter-spacing: 0.6px !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        text-rendering: optimizeLegibility !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        text-shadow: none !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        background-clip: unset !important;
    }
    
    .wisdom-subtitle {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.7) !important; /* 確保半透明白色文字 */
    }
    
    .refresh-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 20px;
        gap: 0.6rem;
    }
    
    .refresh-icon {
        font-size: 1.2rem;
    }
    
    .refresh-text {
        font-size: 0.85rem;
        letter-spacing: 0.4px;
    }
    
    .calendar-info {
        margin: 0 1rem;
        padding: 1.5rem 1.2rem;
        border-radius: 20px;
    }
    
    .calendar-loading {
        gap: 1.2rem;
        padding: 0.8rem 0;
    }
    
    .loading-spinner {
        width: 28px;
        height: 28px;
        border-width: 3px;
    }
    
    .calendar-row {
        gap: 0.4rem;
    }
    
    .calendar-item {
        padding: 0.3rem 0.6rem;
        border-radius: 8px;
    }
    
    .wisdom-scroll {
        margin: 1rem 0.8rem;
        padding: 2rem 1.5rem;
        border-radius: 24px;
        width: calc(100% - 1.6rem);
    }
    
    .meditation-icon {
        font-size: 3.5rem;
    }
    
    .meditation-icon::before {
        width: 70px;
        height: 70px;
    }
    
    .loading-text {
        font-size: 1.2rem;
        letter-spacing: 0.4px;
    }
    
    .loading-dots {
        gap: 0.6rem;
    }
    
    .loading-dots span {
        width: 10px;
        height: 10px;
    }
    
    .wisdom-blessing {
        margin: 0.8rem 1rem 1.2rem 1rem;
        padding: 1.5rem 1.2rem;
        border-radius: 20px;
    }
    
    .blessing-text {
        font-size: 1rem;
        letter-spacing: 0.3px;
    }
    
    .star {
        font-size: 1.2rem;
    }
    
    .star-1 { font-size: 1.4rem; }
    .star-2 { font-size: 1rem; }
    .star-3 { font-size: 1.1rem; }
    .star-4 { font-size: 0.9rem; }
    
    .moon-phase {
        font-size: 1.8rem;
    }
    
    .particle {
        width: 5px;
        height: 5px;
    }
    
    .particle:nth-child(1) { width: 4px; height: 4px; }
    .particle:nth-child(2) { width: 6px; height: 6px; }
    .particle:nth-child(3) { width: 3px; height: 3px; }
    
    .mystical-aura {
        width: 150px;
        height: 150px;
    }
    }
    
    .wisdom-excerpt {
        font-size: 1.2rem;
        line-height: 1.8;
        padding: 1.5rem 1.2rem;
        letter-spacing: 0.4px;
        word-spacing: 0.08em;
        text-indent: 1.5em;
    }
    
    .wisdom-excerpt::after {
        top: 0.8rem;
        right: 1.2rem;
        font-size: 1rem;
    }
    
    .wisdom-principle {
        font-size: 1.1rem;
        line-height: 1.7;
        padding: 1.5rem 1.2rem;
        letter-spacing: 0.3px;
        word-spacing: 0.08em;
    }
    
    .wisdom-notes {
        font-size: 1rem;
        line-height: 1.6;
        padding: 1.5rem 1.2rem;
        letter-spacing: 0.2px;
        word-spacing: 0.08em;
    }
    
    .wisdom-excerpt-title,
    .wisdom-principle-title,
    .wisdom-notes-title,
    .wisdom-source-title {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
        padding-left: 0.3rem;
    }
    
    .wisdom-source {
        padding: 1rem 1.5rem;
        gap: 0.6rem;
    }
    
    .source-icon {
    font-size: 1.2rem;
    }
    
    .wisdom-name {
        font-size: 1rem;
        letter-spacing: 0.3px;
    }
    
    .error-icon {
        font-size: 2.5rem;
    }
    
    .error-main-text {
        font-size: 1.2rem;
    }


.card-content {
    padding: 1.5rem;
}

.mood-input-section {
    margin-bottom: 1rem;
}

.mood-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.mood-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    resize: vertical;
    transition: border-color 0.2s ease;
}

.mood-input:focus {
    outline: none;
    border-color: #667eea;
}

.emotion-selection {
    margin-top: 1rem;
}

.emotion-prompt {
    margin-bottom: 1rem;
    font-weight: 500;
    color: #333;
}

.emotion-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

/* 主要情緒選項 - 3x2排列 - 只在顯示時應用 */
#mainEmotionOptions[style*="block"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    max-width: 300px !important;
    margin: 0 auto !important;
}

#mainEmotionOptions[style*="block"] .emotion-option {
    aspect-ratio: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem !important;
    border-radius: 12px !important;
    background: white !important;
    border: 2px solid #e0e0e0 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    text-align: center !important;
    min-height: 80px !important;
    width: auto !important;
}

#mainEmotionOptions[style*="block"] .emotion-option:hover {
    border-color: #667eea !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
}

#mainEmotionOptions[style*="block"] .emotion-option.selected {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
}

#mainEmotionOptions[style*="block"] .emotion-option .emoji {
    font-size: 1.8rem !important;
    margin-bottom: 0.25rem !important;
    display: block !important;
}

#mainEmotionOptions[style*="block"] .emotion-option .label {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    transform: none !important;
}

.emotion-option {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.emotion-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.emotion-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.emotion-option .emoji {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

.emotion-option .label {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
    color: #666;
}

/* 簡化的屬性顯示樣式 */
.attributes-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

.attr-item {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #555;
    flex: 1;
    justify-content: center;
}

.attr-item span {
    font-weight: bold;
    color: #333;
    margin-left: 0.3rem;
}


/* 底部導航 */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999; /* 低於固定header的z-index */
}

/* 隱藏底部導航當未登入時 */
body:not(.logged-in) .bottom-navigation {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    color: #888;
}

.nav-item.active {
    color: #667eea;
}

.nav-item:hover {
    color: #667eea;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-item span {
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.7); /* 視覺縮小到0.7倍 */
    transform-origin: center;
    font-weight: 500;
}

/* 按鈕樣式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);  /* 與新配色協調 */
    color: white;
    font-size: 1rem;  /* 增加字體大小 */
    font-weight: 600;
    padding: 0.75rem 1.5rem;  /* 增加padding */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);  /* 調整陰影色彩 */
    background: linear-gradient(135deg, #5b5bd6 0%, #7c3aed 100%);  /* hover時稍微加深 */
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.8); /* 視覺縮小到0.8倍 */
    transform-origin: center;
}

.btn-link {
    background: none;
    color: #667eea;
    padding: 0.25rem 0.5rem;
    font-size: 16px; /* 保持16px避免iOS放大 */
    transform: scale(0.9); /* 視覺縮小到0.9倍 */
    transform-origin: center;
}

.btn-link:hover {
    text-decoration: underline;
}

/* 模態框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100; /* 高於header的z-index */
    backdrop-filter: blur(5px);
    padding-bottom: 80px; /* 為底部導航留出空間 */
    cursor: pointer; /* 指示背景可點擊關閉 */
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    z-index: 1101; /* 確保在modal背景之上 */
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    cursor: default; /* 內容區域恢復默認游標 */
}

/* 承諾確認模態框樣式 - 手機優化 */
.commitment-modal {
    max-width: 95%;
    width: 550px;
    max-height: 90vh;
    border: 3px solid #ff6b35;
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
    animation: commitmentPulse 2s ease-in-out infinite;
    overflow-y: auto; /* 確保可以滾動 */
    -webkit-overflow-scrolling: touch; /* iOS滑動優化 */
}

/* 手機版承諾模態框優化 */
@media screen and (max-width: 480px) {
    .commitment-modal {
        max-width: 95%;
        width: calc(100vw - 2rem);
        max-height: 85vh;
        margin: 1rem;
        overflow-y: auto;
    }
    
    .commitment-modal .modal-body {
        padding: 1rem;
        max-height: calc(85vh - 140px); /* 減去header和footer高度 */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .commitment-actions {
        padding: 1rem;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #eee;
        margin: 0 -1rem -1rem -1rem;
    }
}

@keyframes commitmentPulse {
    0%, 100% {
        box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
        border-color: #ff6b35;
    }
    50% {
        box-shadow: 0 15px 40px rgba(255, 107, 53, 0.6);
        border-color: #ff4500;
    }
}

.commitment-modal .modal-header {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: relative;
}

.warning-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: warningShake 1.5s ease-in-out infinite;
}

@keyframes warningShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.commitment-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

.warning-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e65100;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.warning-message {
    font-size: 1rem;
    color: #bf360c;
    margin: 0.5rem 0;
    font-weight: 500;
    line-height: 1.6;
}

.warning-emphasis {
    font-size: 1.1rem;
    color: #d84315;
    font-weight: bold;
    margin-top: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    border-top: 2px solid #ff9800;
    padding-top: 1rem;
}

.task-commitment-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #007bff;
}

.commitment-section {
    margin-top: 2rem;
}

.commitment-question {
    text-align: center;
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.question-subtitle {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.commitment-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.commitment-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: 2px solid #4caf50;
    animation: commitmentGlow 2s ease-in-out infinite;
}

@keyframes commitmentGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
    }
}

.commitment-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 180px;
}

.btn-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* 任務建議樣式 */
.task-recommendation {
    padding: 1rem 0;
}

.recommendation-header h4 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.task-info {
    margin-bottom: 1.5rem;
}

.task-info h5 {
    color: #007bff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.task-meta-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 1rem;
}

.meta-item {
    color: #666;
    font-size: 0.9rem;
}

.meta-item strong {
    color: #333;
}

.recommendation-note {
    margin-top: 1.5rem;
}

.recommendation-note p {
    color: #666 !important;
    font-style: italic !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 1rem !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border-left: 4px solid #17a2b8 !important;
}

/* 完成任務模態框特殊樣式 - 手機優化 */
.completion-modal {
    max-width: 95%;
    width: 750px;  /* 稍微增加寬度 */
    max-height: 90vh;
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);  /* 與wisdom-section協調 */
    border: 2px solid rgba(99, 102, 241, 0.1);  /* 淡紫邊框 */
    border-radius: 24px;  /* 稍微增加圓角 */
    box-shadow: 0 25px 80px rgba(99, 102, 241, 0.15);  /* 紫色陰影 */
    overflow: hidden;
}

/* 手機版智慧啟發模態框優化 */
@media screen and (max-width: 480px) {
    .completion-modal {
        max-width: 95%;
        width: calc(100vw - 2rem);
        margin: 1rem;
        max-height: 85vh;
    }
    
    .completion-modal .modal-body {
        padding: 0.5rem;  /* 手機版更少padding */
        max-height: calc(85vh - 120px);
    }
}

.completion-modal .modal-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);  /* 與wisdom-section協調的紫色 */
    color: white;
    padding: 1.8rem 2rem;  /* 稍微增加padding */
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    border-radius: 22px 22px 0 0;  /* 配合新的圓角 */
}

.completion-icon {
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(10deg); }
}

.completion-modal .modal-header h3 {
    margin: 0;
    font-size: 1.6rem;  /* 增加字體大小 */
    font-weight: 700;   /* 增加字重 */
    flex: 1;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);  /* 添加文字陰影 */
}

.completion-modal .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.completion-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.completion-modal .modal-body {
    padding: 0.5rem;  /* 極少padding，讓wisdom-section自己控制間距 */
    max-height: calc(90vh - 140px);  /* 配合增加的header padding */
    overflow-y: auto;
    background: transparent;  /* 透明背景，讓wisdom-section的背景顯示 */
}

/* 區域標題樣式 */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-icon {
    font-size: 1.2rem;
}

.section-title h4 {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 智慧啟發區域 */
.wisdom-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.wisdom-section .section-title {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.wisdom-section .section-title h4 {
    color: white;
}


.wisdom-content .excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.wisdom-content .principle {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 500;
}

.wisdom-content .notes {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.wisdom-content .source {
    font-size: 0.8rem;
    text-align: right;
    opacity: 0.8;
    font-style: italic;
}

/* 體悟填寫區域 */
.reflection-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.reflection-input-container {
    position: relative;
}

.reflection-input-container textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

.reflection-input-container textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 屬性提升區域 */
.attributes-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.attribute-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #dee2e6;
}

.attribute-item .attr-name {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.attribute-item .attr-change {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.attribute-item .attr-change.negative {
    color: #dc3545;
}

/* 修煉成果欄位樣式 - 完成彈窗專用 */
.completion-modal .attributes-section .attributes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.completion-modal .attributes-section .attribute-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    text-align: center;
    min-height: 80px;
}

.completion-modal .attributes-section .attr-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.completion-modal .attributes-section .attr-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

.completion-modal .attributes-section .attr-name {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.completion-modal .attributes-section .attr-change {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    min-width: 2.5rem;
    text-align: center;
}

.completion-modal .attributes-section .attr-change.positive {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.completion-modal .attributes-section .attr-change.negative {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* 手機版調整 */
@media (max-width: 768px) {
    .completion-modal .attributes-section .attributes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .completion-modal .attributes-section .attribute-item {
        padding: 0.5rem 0.25rem;
        min-height: 70px;
    }
    
    .completion-modal .attributes-section .attr-icon {
        font-size: 1.2rem;
    }
    
    .completion-modal .attributes-section .attr-name {
        font-size: 0.7rem;
    }
    
    .completion-modal .attributes-section .attr-change {
        font-size: 1rem;
        padding: 0.2rem 0.4rem;
        min-width: 2rem;
    }
}

/* 完成按鈕 */
.completion-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 1.5rem;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 認證模態框 */
.auth-modal {
    max-width: 350px;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.auth-switch p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* 智慧揭示 */
.wisdom-reveal {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f2ff 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.wisdom-reveal .content {
    font-style: italic;
    color: #333;
    margin-bottom: 0.5rem;
}

.wisdom-reveal .source {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

/* 屬性變化 */
.attribute-changes {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.attribute-changes h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.attribute-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.attribute-change.positive {
    color: #2e7d32;
}

.attribute-change.negative {
    color: #d32f2f;
}

/* 升級動畫 */
.upgrade-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.upgrade-animation.show {
    display: flex;
}

.upgrade-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    animation: upgradePulse 2s ease-in-out;
}

.upgrade-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.upgrade-text {
    font-size: 0.9rem;
    font-weight: bold;
}

@keyframes upgradePulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* 反思區域 */
.reflection-section {
    margin-bottom: 1rem;
}

/* 情緒選擇樣式 */
.emotion-step {
    margin-bottom: 1rem;
}

.emotion-step h4 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.sub-emotions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.emotion-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.emotion-option:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.emotion-option.selected {
    background: #667eea;
    color: white;
    border-color: #764ba2;
}

.emotion-option .emoji {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.emotion-option .label {
    font-size: 0.8rem;
    font-weight: 500;
}

/* 智慧經典顯示樣式 */
.wisdom-reveal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.wisdom-reveal h3 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}


.wisdom-content h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.wisdom-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.wisdom-content .source {
    text-align: right;
    font-style: italic;
    opacity: 0.8;
    margin-top: 1rem;
}

.reflection-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.reflection-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

/* 響應式設計 */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }
    
    .logs-page {
        padding: 0.5rem;
        overflow-x: hidden;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    /* 手機端響應式調整 */
    .status-bar {
        height: 20px;
        font-size: 0.7rem;
        padding: 0 0.8rem;
    }
    
    .top-header {
        top: 20px; /* 在較小的狀態欄下方 */
        height: 45px;
    }
    
    .header-content {
        padding: 0 0.8rem;
    }
    
    .realm-badge span {
        font-size: 0.8rem;
        padding: 0.15rem 0.5rem;
    }
    
    .stats-container {
        margin: 0 0.5rem;
        gap: 0.2rem;
    }
    
    .exp-bar {
        height: 6px;
    }
    
    .exp-text {
        font-size: 0.65rem;
    }
    
    .attributes-row {
        gap: 0.6rem;
    }
    
    .attr-icon {
        font-size: 0.7rem;
    }
    
    .attr-value {
        font-size: 0.7rem;
        min-width: 1.2rem;
    }
    
    .menu-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    /* body.logged-in padding已移至下方統一管理 */
    
    .main-content {
        padding: 0.75rem;
        padding-bottom: 100px; /* 手機版也增加底部padding */
    }
    
    .modal-content {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .emotion-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 手機版主要情緒選項 */
    #mainEmotionOptions[style*="block"] {
        max-width: 280px !important;
        gap: 0.6rem !important;
    }
    
    #mainEmotionOptions[style*="block"] .emotion-option {
        min-height: 70px !important;
        padding: 0.6rem !important;
    }
    
    #mainEmotionOptions[style*="block"] .emotion-option .emoji {
        font-size: 1.6rem !important;
    }
    
    #mainEmotionOptions[style*="block"] .emotion-option .label {
        font-size: 0.75rem !important;
    }
}

/* 加載動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 錯誤和成功消息 */
.message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.message.error {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message.info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* 情緒流程按鈕樣式 */
.emotion-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.emotion-actions .btn {
    flex: 1;
    max-width: 120px;
}

/* 情緒步驟樣式 */
.emotion-step {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.emotion-step h4 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    text-align: center;
}

/* 細緻情緒選項樣式 */
.sub-emotions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sub-emotions .emotion-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-emotions .emotion-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.sub-emotions .emotion-option.selected {
    background: #667eea;
    color: white;
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 事件詳情輸入樣式 */
#emotionDetailInput {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    resize: vertical;
    transition: border-color 0.2s ease;
    margin-bottom: 1rem;
}

#emotionDetailInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 警告消息樣式 */
.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 頁面內容樣式 */
.page-content {
    background: white;
    min-height: calc(100vh - 80px);
    padding: 1rem;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

/* 日誌頁面樣式 */
.logs-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    background: transparent;
    overflow-x: hidden;
}

.logs-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.logs-filters .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-width: auto;
}

.log-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.log-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

/* 篩選隱藏的日誌項目 */
.log-item.filtered-hidden {
    display: none !important;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.log-date {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.log-task-badge {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.log-emotion-badge {
    background: #ff6b6b;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.log-content {
    color: #555;
}

.log-task-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.log-mood-preview {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.log-wisdom-indicator {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin: 0.5rem 0;
}

.log-wisdom-source {
    background: #fff3e0;
    color: #e65100;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin: 0.5rem 0;
    border: 1px solid #ffcc02;
}

.log-wisdom-notes {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.5rem 0;
    border-left: 3px solid #9c27b0;
}

.log-event-description {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.5rem 0;
    border-left: 3px solid #4caf50;
}

/* 重新設計的日誌卡片樣式 */
.log-emotion-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.log-emotion-tags span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.log-main-content {
    margin: 0.8rem 0;
}

.log-mood-section {
    margin-bottom: 0.6rem;
}

.log-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.log-mood-text {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.log-event-section {
    margin-top: 0.6rem;
}

.log-event-text {
    color: #2e7d32;
    font-size: 0.85rem;
    line-height: 1.4;
    background: #e8f5e8;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid #4caf50;
}

.log-reflection-section {
    margin-top: 0.6rem;
}

.log-reflection-text {
    color: #7b1fa2;
    font-size: 0.85rem;
    line-height: 1.4;
    background: #f3e5f5;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid #9c27b0;
}

.log-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid #e9ecef;
}

.log-wisdom-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #fff3e0;
    color: #e65100;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.wisdom-icon {
    font-size: 0.8rem;
}

.wisdom-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* max-width: 120px; */ /* 移除寬度限制，讓智慧來源完整顯示 */
}

.log-action-hint {
    color: #6c757d;
    font-size: 0.75rem;
    font-style: italic;
}

/* 修煉日記詳情彈窗樣式 */
.cultivation-diary-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}


.diary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.diary-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.diary-emotion-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.diary-emotion-tags span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.diary-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.diary-section.mood-record {
    border-left-color: #28a745;
    background: #f8fff9;
}

.diary-section.cultivation-result {
    border-left-color: #28a745;
    background: #f8fff9;
}

.diary-section.task-details {
    border-left-color: #ffc107;
    background: #fffdf5;
}

.diary-section.wisdom-revealed {
    border-left-color: #6f42c1;
    background: #f8f5ff;
}

.diary-section.attribute-changes {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mood-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mood-text {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #28a745;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.event-description {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #17a2b8;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
}

.task-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-detail-btn {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.task-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.reflection-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #6f42c1;
}

.reflection-content h5 {
    color: #6f42c1;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.reflection-text {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

.wisdom-excerpt,
.wisdom-principle,
.wisdom-notes,
.wisdom-source {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #6f42c1;
}

.wisdom-excerpt h5,
.wisdom-principle h5,
.wisdom-notes h5,
.wisdom-source h5 {
    color: #6f42c1;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.excerpt-text {
    font-style: italic;
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

.principle-text,
.notes-text,
.source-text {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

.attribute-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.attribute-item {
    background: white;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    border: 2px solid #dc3545;
    color: #dc3545;
    font-weight: 500;
    font-size: 0.9rem;
}

.no-wisdom,
.no-attributes,
.no-reflection {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* 收縮功能樣式 */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.collapsible-header:hover {
    background: rgba(0,0,0,0.02);
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0 -0.5rem 1rem -0.5rem;
}

.collapse-icon {
    font-size: 0.8rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.collapsible-content {
    padding-top: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 修煉成果樣式 */
.cultivation-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reflection-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #28a745;
}

.reflection-text {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 任務詳情樣式 */
.task-info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

.task-title {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.task-description {
    color: #6c757d;
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.task-category {
    color: #17a2b8;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.task-code {
    color: #6c757d;
    font-size: 0.8rem;
    font-family: monospace;
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
}


.diary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.diary-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.diary-emotion-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.diary-emotion-tags span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.diary-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 區塊一：心情紀錄 */
.mood-record {
    border-left-color: #28a745;
}

.mood-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mood-text {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #28a745;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.event-description {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2e7d32;
}

/* 區塊二：任務紀錄 */
.task-record {
    border-left-color: #ffc107;
}

.task-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-detail-btn {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.task-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

.reflection-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

.reflection-content h5 {
    color: #856404;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.reflection-text {
    color: #333;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 區塊三：智慧顯現 */
.wisdom-revealed {
    border-left-color: #6f42c1;
}

.wisdom-excerpt,
.wisdom-principle,
.wisdom-notes,
.wisdom-source {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #6f42c1;
}

.wisdom-excerpt h5,
.wisdom-principle h5,
.wisdom-notes h5,
.wisdom-source h5 {
    color: #6f42c1;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.excerpt-text {
    font-style: italic;
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
}

.principle-text,
.notes-text,
.source-text {
    color: #333;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 區塊四：屬性提升 */
.attribute-changes {
    border-left-color: #17a2b8;
}

.attribute-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #17a2b8;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.attribute-item:last-child {
    border-bottom: none;
}

.attribute-name {
    font-weight: 500;
    color: #495057;
}

.attribute-change {
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.attribute-change.positive {
    background: #d4edda;
    color: #155724;
}

.attribute-change.negative {
    background: #f8d7da;
    color: #721c24;
}

.attribute-change.neutral {
    background: #e2e3e5;
    color: #383d41;
}

/* 日誌詳情樣式 */
.log-detail-event-description {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.log-detail-reflection {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.log-reflection-preview {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-style: italic;
    font-size: 0.9rem;
}

.log-note {
    text-align: center;
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.3rem;
    background: #f0f4ff;
    border-radius: 6px;
}

/* 日誌詳情模態框樣式 */
.log-detail-modal {
    max-width: 90%;
    width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.log-detail-content {
    padding: 0.5rem;
}

/* 敘事式內容樣式 */
.narrative-content {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.narrative-story {
    text-align: center;
}

.narrative-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2d3748;
    font-style: italic;
    margin: 0;
}

/* 詳細信息區塊樣式 */
.detail-sections {
    margin-top: 1.5rem;
}

.log-detail-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid #667eea;
}

.log-detail-section h4 {
    color: #4a5568;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
}

.log-detail-emotion-tags {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
}

.log-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.log-detail-date {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.log-detail-category {
    background: #667eea;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.log-detail-emotion {
    background: #ff6b6b;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.log-detail-section {
    margin-bottom: 1.5rem;
}

.log-detail-section h4 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.log-detail-task {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.log-detail-mood, .log-detail-emotion {
    background: #fff3e0;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #ff9800;
}

.log-detail-reflection {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    font-style: italic;
    line-height: 1.6;
}

.log-detail-wisdom {
    background: #f3e5f5;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
}

.wisdom-excerpt, .wisdom-principle, .wisdom-notes, .wisdom-source {
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
}

.wisdom-excerpt {
    border-left: 3px solid #2196f3;
}

.wisdom-principle {
    border-left: 3px solid #ff9800;
}

.wisdom-notes {
    border-left: 3px solid #4caf50;
}

.wisdom-source {
    border-left: 3px solid #9c27b0;
    font-size: 0.9rem;
    color: #666;
}

.log-detail-attributes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 任務列表改進樣式 */
.task-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.task-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.task-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    margin-right: 1rem;
}

.task-status-badge {
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.task-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.task-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.task-category-badge {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-duration {
    background: #fff3e0;
    color: #f57c00;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-date {
    color: #666;
    font-size: 0.8rem;
}

.task-reflection-preview {
    background: #f0f8ff;
    border-left: 3px solid #4a90e2;
    padding: 0.8rem;
    margin-top: 0.8rem;
    border-radius: 6px;
    font-style: italic;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.page-content h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

/* 任務頁面樣式 */
.tasks-page {
    max-width: 100%;
}

.task-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.task-filters .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.all-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-date {
    font-size: 0.7rem;
    color: #999;
}

/* 任務項目的額外樣式 */
.task-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.task-item .task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}


/* 新的情緒流程步驟樣式 */
.emotion-flow-step {
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1rem;
    margin-right: 1rem;
}

.step-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.step-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* 事件詳情樣式 */
.emotion-detail-section {
    margin-bottom: 1rem;
}

.detail-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.detail-input {
    width: 100%;
    min-height: 80px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    resize: vertical;
    font-family: inherit;
}

.detail-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 任務推薦動畫效果 */
/* 任務標題發光效果 */
.task-title-glow {
    color: #0056b3 !important;
    margin-bottom: 1rem !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    text-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
    animation: titlePulse 1.5s ease-in-out infinite;
    text-align: center;
    background: linear-gradient(45deg, #007bff, #6610f2, #007bff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titlePulse 1.5s ease-in-out infinite, gradientShift 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        text-shadow: 0 0 15px rgba(0, 123, 255, 0.5), 0 0 30px rgba(102, 16, 242, 0.3);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 123, 255, 0.8), 0 0 50px rgba(102, 16, 242, 0.5);
        transform: scale(1.05);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 分類徽章動畫 */
.task-category-badge {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* 新的任务分类标题样式 - 作为主标题 */
.task-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding: 1rem 0;
    border-bottom: 3px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: -1rem -1.5rem 1.2rem -1.5rem;
    text-align: center;
}

.category-icon {
    font-size: 1.5rem;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.task-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

/* 保留旧的样式以防其他地方使用 */
.category-glow {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: default;
}

/* 禁用按钮样式 */
.btn-disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-disabled:hover {
    background: #ccc !important;
    border-color: #ccc !important;
    transform: none !important;
}

/* 移除分类徽章的动画效果，现在使用简单的标签样式 */

/* 移除categoryFloat动画 */

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.category-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: scale(1.2) rotate(270deg);
        opacity: 0.8;
    }
}

.category-text {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 推薦提示優化 */
.recommendation-tip {
    color: #666 !important;
    font-style: italic !important;
    text-align: center !important;
    margin-top: 1.5rem !important;
    padding: 1rem !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 123, 255, 0.1) !important;
    animation: tipGlow 4s ease-in-out infinite;
}

@keyframes tipGlow {
    0%, 100% {
        border-color: rgba(0, 123, 255, 0.1);
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.05);
    }
    50% {
        border-color: rgba(0, 123, 255, 0.2);
        box-shadow: 0 4px 16px rgba(0, 123, 255, 0.1);
    }
}

/* 智慧啟發區域樣式 - 直接在section層顯示內容，優化字體和配色 */
.wisdom-section {
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);  /* 漸層白色背景 */
    border: 1px solid rgba(99, 102, 241, 0.1);  /* 淡紫邊框 */
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);  /* 淡紫陰影 */
    margin-bottom: 1.5rem;
}

.wisdom-section .section-title {
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);  /* 淡紫分隔線 */
}

.wisdom-section .section-title h4 {
    color: #4f46e5 !important;  /* 紫色標題 */
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    background: none !important;
    padding: 0 !important;
}

.wisdom-section h4 {
    color: #1e293b;  /* 深藍灰色，更好的對比度 */
    margin: 1rem 0 0.5rem 0;
    font-size: 1.05rem;  /* 增加字體大小 */
    font-weight: 600;
    line-height: 1.3;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border-left: 3px solid #6366f1;  /* 左邊紫色條 */
}

.wisdom-section h4:first-of-type {
    margin-top: 0;
}

.wisdom-section p {
    margin: 0 0 1rem 0;
    color: #334155;  /* 深灰藍色文字 */
    line-height: 1.6;  /* 增加行高 */
    font-size: 1rem;  /* 增加字體大小 */
    word-wrap: break-word;
    word-break: break-word;
    padding-left: 0.6rem;
}

/* 經典出處特殊樣式 - 與新配色方案協調的紫色調 */
.wisdom-section .source-title {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;  /* 紫色漸層 */
    color: white !important;
    padding: 0.5rem 0.8rem !important;  /* 增加padding */
    border-radius: 10px 10px 0 0;
    margin: 1.2rem 0 0 0 !important;
    font-size: 1rem !important;  /* 增加字體大小 */
    font-weight: 600 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border-left: none !important;  /* 移除左邊條，因為已有背景 */
}

.wisdom-section .source-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);  /* 與標題同色 */
    color: white !important;
    padding: 0.6rem 0.8rem !important;  /* 增加padding */
    border-radius: 0 0 10px 10px;
    margin: 0 0 1rem 0 !important;
    position: relative;
    overflow: hidden;
    font-size: 1rem !important;  /* 增加字體大小 */
    line-height: 1.5 !important;
    padding-left: 0.8rem !important;
}

.wisdom-section .source-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);  /* 增強shimmer效果 */
    animation: shimmer 4s infinite;  /* 稍微放慢動畫 */
}

.wisdom-section .source-text strong {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    font-weight: 600;
}

/* 手機版智慧啟發區域優化 - 保持較大字體，優化間距 */
@media screen and (max-width: 480px) {
    .wisdom-section {
        padding: 1rem;  /* 保持足夠padding */
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .wisdom-section .section-title {
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem;
    }
    
    .wisdom-section .section-title h4 {
        font-size: 1rem !important;  /* 手機版稍小但仍清晰 */
    }
    
    .wisdom-section h4 {
        font-size: 0.95rem;  /* 保持較大字體 */
        margin: 0.8rem 0 0.4rem 0;
        padding: 0.3rem 0.5rem;
    }
    
    .wisdom-section p {
        font-size: 0.9rem;  /* 保持較大字體 */
        line-height: 1.5;
        margin-bottom: 0.8rem;
        padding-left: 0.5rem;
    }
    
    .wisdom-section .source-title {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.9rem !important;  /* 保持較大字體 */
        margin: 1rem 0 0 0 !important;
    }
    
    .wisdom-section .source-text {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.9rem !important;  /* 保持較大字體 */
        line-height: 1.4 !important;
    }
}

/* 移除重複的樣式，統一在前面定義 */

/* ========== 新的Header設計 ========== */

/* 可隱藏的頂部標題欄 - 與應用協調的設計 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);  /* 與應用主色調一致 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1002;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
    border-bottom: none;  /* 移除底部邊框，實現無縫連接 */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.app-header.hidden {
    transform: translateY(-100%);
    visibility: hidden;
    opacity: 0;
}

.fixed-status-bar.hidden {
    transform: translateY(-100%);
    visibility: hidden;
    opacity: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.app-logo {
    height: 5rem;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    object-fit: contain;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.app-header .menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-header .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.app-header .menu-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 固定的屬性狀態條 - 與應用協調的設計 */
.fixed-status-bar {
    position: fixed;
    top: 60px;  /* 緊接在app-header下方，無間隔 */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.99) 100%);
    backdrop-filter: blur(20px);
    color: #2d3748;
    z-index: 1001;
    padding: 0.6rem 1rem;  /* 減少padding */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-top: none;  /* 移除頂部邊框，避免視覺間隔 */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* 狀態條位置由JavaScript動態控制 */

/* 強制確保header和狀態欄無間隔 */
.app-header + .fixed-status-bar {
    margin-top: 0 !important;
    /* 移除強制的top設置，讓JavaScript控制 */
}

.status-time-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.fixed-status-bar .status-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fixed-status-bar .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.fixed-status-bar .status-dot.online {
    background: #10b981;
}

.fixed-status-bar .status-text {
    font-size: 0.8rem;
    color: #4a5568;
}

.fixed-status-bar .status-time {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #2d3748;
}

.cultivation-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.realm-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.realm-label {
    font-size: 0.7rem;
    color: #718096;
    margin-bottom: 0.2rem;
}

.realm-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    border: 1px solid #cbd5e0;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.1);
}

.exp-section {
    flex: 1;
    margin: 0 1rem;
}

/* 在狀態指示器中的每日修煉次數樣式 */
.fixed-status-bar .daily-cultivation-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.fixed-status-bar .exp-bar {
    position: relative;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #cbd5e0;
}

.fixed-status-bar .exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 2px; /* 确保经验值条至少显示一点 */
}

.fixed-status-bar .exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.attributes-grid {
    display: flex;
    gap: 0.8rem;
}

.attr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
    position: relative;
    cursor: pointer;
}

.attr-item .attr-icon {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.attr-item .attr-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
}

/* tooltip樣式 */
.attr-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 55, 72, 0.95);
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1200; /* 高於modal的z-index */
    border: 1px solid #4a5568;
}

.attr-item:hover::before {
    opacity: 1;
}

/* 調整body padding以適應新的header高度 */
body.logged-in {
    padding-top: 180px !important; /* 大幅增加padding，確保內容不被遮住 */
}

/* 手機版優化 */
@media screen and (max-width: 480px) {
    .app-header {
        height: 50px;
        padding: 0 1rem;
    }
    
    .app-title {
        font-size: 1.2rem;
    }
    
    .app-logo {
        height: 5rem;
        width: auto;
    }
    
    .fixed-status-bar {
        top: 50px;
        padding: 0.5rem 0.8rem;  /* 減少手機版padding */
        background: #ffffff;
        border-top: none;  /* 確保手機版也無間隔 */
    }
    
    .fixed-status-bar .daily-cultivation-count {
        font-size: 0.6rem;
        padding: 0.05rem 0.3rem;
    }
    
    .cultivation-status {
        gap: 0.6rem;
    }
    
    .realm-section {
        min-width: 60px;
    }
    
    .realm-name {
        font-size: 0.8rem;
        padding: 0.15rem 0.4rem;
    }
    
    .exp-section {
        margin: 0 0.6rem;
    }
    
    .attributes-grid {
        gap: 0.5rem;
    }
    
    .attr-item {
        min-width: 35px;
    }
    
    .attr-item .attr-icon {
        font-size: 1rem;
    }
    
    .attr-item .attr-value {
        font-size: 0.7rem;
    }
    
    body.logged-in {
        padding-top: 150px !important; /* 大幅增加手機版padding，確保內容不被遮住 */
    }
    
    /* 手機版底部導航優化 */
    .bottom-navigation {
        max-width: 100%;
        padding: 0.6rem 0; /* 稍微增加手機版底部導航的padding */
    }
}

/* --- Minimal 風格覆蓋（更簡潔、更少裝飾） --- */
.minimal .modal-header h3 {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.minimal .diary-emotion-tags span,
.minimal .log-emotion-tags span {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.minimal .diary-section {
    background: #ffffff;
    border-left: 3px solid #e5e7eb;
    box-shadow: none;
}

.minimal .diary-section .section-title,
.minimal .task-detail-section h4 {
    margin: 0 0 0.6rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.minimal .mood-text,
.minimal .reflection-text,
.minimal .task-description,
.minimal .notes-text,
.minimal .principle-text,
.minimal .source-text {
    color: #111827;
    line-height: 1.7;
}

.minimal .no-reflection,
.minimal .no-wisdom,
.minimal .no-attributes {
    color: #6b7280;
}

/* 任務日誌詳情模態窗 minimal */
.task-log-modal {
    max-width: 560px;
}

.minimal .task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.minimal .task-detail-date,
.minimal .task-detail-status {
    color: #6b7280;
    font-size: 0.9rem;
}

.minimal .task-detail-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.minimal .collapsible-header {
    border: 1px solid #f3f4f6;
}

/* 編輯功能樣式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.edit-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    opacity: 0.6;
}

.edit-btn:hover {
    background: #f3f4f6;
    opacity: 1;
}

.mood-edit,
.reflection-edit {
    margin-top: 0.5rem;
}

.mood-edit textarea,
.reflection-edit textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

.mood-edit textarea:focus,
.reflection-edit textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

.edit-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.edit-actions .btn-primary:hover {
    background: #2563eb;
}

.edit-actions .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.edit-actions .btn-secondary:hover {
    background: #e5e7eb;
}

/* 日誌操作相關樣式 */
.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.logs-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.batch-delete-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-confirm-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logs-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.selected-count {
    color: #6b7280;
    font-size: 0.9rem;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
}

.log-checkbox {
    margin-top: 0.5rem;
}

.log-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
}

.log-content-wrapper {
    flex: 1;
}

.log-actions {
    margin-top: 0.5rem;
}

.log-action-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.log-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #374151;
}

.log-action-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
    overflow: hidden;
}

.log-action-menu-content {
    padding: 0.5rem 0;
}

.log-action-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.log-action-item:hover {
    background: #f3f4f6;
}

.log-action-item .action-icon {
    font-size: 1rem;
}

.log-action-item[data-action="delete"] {
    color: #dc2626;
}

.log-action-item[data-action="delete"]:hover {
    background: #fef2f2;
}

/* 批量操作按鈕樣式 */
.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* 批量刪除按鈕樣式 */
.btn-outline-danger {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-outline-danger:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-outline-secondary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* 成功按鈕樣式 */
.btn-success {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-primary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-weight: 500;
}

/* 搜索和篩選樣式 */
.logs-search-section {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0; /* 確保可以縮小 */
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px; /* 修復iOS Safari自動放大問題 */
    background: white;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    color: #6b7280;
    background: #f3f4f6;
}

/* 篩選按鈕樣式 */
.filter-btn {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-primary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.search-options {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.search-scope, .filter-options {
    margin-bottom: 1rem;
}

.search-scope:last-child, .filter-options:last-child {
    margin-bottom: 0;
}

.search-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.search-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.filter-selects {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #374151;
    min-width: 120px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 情緒行樣式 */
.log-emotion-line {
    margin-bottom: 0.75rem;
}

/* 情緒標籤樣式 */
.emotion-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
    border: 1px solid #bbdefb;
}

/* 置頂按鈕樣式 */
.scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0.9;
}

.scroll-to-top-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    opacity: 1;
}

.scroll-to-top-btn:active {
    transform: translateY(0);
}

/* 加載指示器樣式 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .search-container {
        flex-direction: row; /* 保持水平布局 */
        align-items: center;
        gap: 0.5rem;
    }
    
    .search-input-wrapper {
        flex: 1;
        min-width: 0;
    }
    
    .filter-btn {
        min-width: 44px;
        height: 44px;
        padding: 0.5rem;
    }
    
    .scroll-to-top-btn {
        width: 45px;
        height: 45px;
        bottom: 7rem; /* 再提高位置，確保與底部導航有足夠距離 */
        right: 1.5rem;
        font-size: 1.3rem;
    }
    
    .search-checkboxes {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-selects {
        flex-direction: column;
    }
    
    .filter-select {
        min-width: auto;
    }
}

/* 簡約統計面板樣式 */
.tasks-content {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.all-tasks-list {
    flex: 1;
}

.task-statistics-panel {
    width: 160px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
}

.stats-summary {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    color: #495057;
    text-align: center;
    font-weight: 500;
}

.encouragement-message {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.75rem;
    color: #2d3436;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 手機版統計面板適配 */
@media screen and (max-width: 768px) {
    .tasks-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .task-statistics-panel {
        width: 100%;
        order: -1;
        padding: 0.6rem;
    }
    
    .stats-summary {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .stat-item {
        flex: 1;
        padding: 0.5rem;
    }
    
    .stat-number {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* 標題欄動作區域 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 召喚系統按鈕 */
.summon-btn {
    background: linear-gradient(135deg, #1a1a2e, #2d1b69);
    border: 2px solid #4a2c5a;
    border-radius: 12px;
    padding: 8px 16px;
    color: #e6e6fa;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(45, 27, 105, 0.3);
    display: none;
    align-items: center;
    gap: 6px;
    animation: gentle-pulse 3s ease-in-out infinite;
}

.summon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(45, 27, 105, 0.5);
    border-color: #6a4c93;
    animation: none;
}

.summon-btn:active {
    transform: translateY(0);
}

.summon-icon {
    font-size: 16px;
    animation: gentle-float 2s ease-in-out infinite;
}

.summon-text {
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.summon-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(138, 43, 226, 0.1), transparent);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summon-btn:hover .summon-glow {
    opacity: 1;
    animation: gentle-shimmer 1.5s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(45, 27, 105, 0.3);
        border-color: #4a2c5a;
    }
    50% { 
        box-shadow: 0 2px 12px rgba(45, 27, 105, 0.5);
        border-color: #6a4c93;
    }
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-1px); }
}

@keyframes gentle-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 過場特效 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
}

.transition-content {
    text-align: center;
    color: #f4e4bc;
}

.transition-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

.transition-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.transition-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 情緒覺察流程樣式 */
.awareness-section {
    text-align: center;
    padding: 2rem 1rem;
}

.awareness-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.awareness-icon {
    font-size: 3rem;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 老妖怪召喚動畫效果 */
.awareness-icon.appear {
    animation: taoistAppear 1.5s ease-out forwards;
}

@keyframes taoistAppear {
    0% {
        opacity: 0;
        transform: scale(0.1);
        filter: blur(20px) brightness(3);
    }
    30% {
        opacity: 0.2;
        transform: scale(0.3);
        filter: blur(15px) brightness(2.5);
    }
    60% {
        opacity: 0.6;
        transform: scale(0.7);
        filter: blur(8px) brightness(1.8);
    }
    80% {
        opacity: 0.8;
        transform: scale(0.9);
        filter: blur(3px) brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px) brightness(1);
    }
}

/* 煙霧效果 */
.awareness-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(200,200,200,0.2) 30%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: smokeEffect 2s ease-out forwards;
    pointer-events: none;
    z-index: -1;
}

@keyframes smokeEffect {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    30% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
    70% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.5);
    }
}

/* 閃光效果 */
.awareness-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.8) 50%, transparent 70%);
    opacity: 0;
    animation: flashEffect 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 1;
}

@keyframes flashEffect {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    50% {
        opacity: 1;
        transform: translateX(0%);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

.awareness-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    max-width: 280px;
}

.countdown-section {
    text-align: center;
    padding: 2rem 1rem;
}

.countdown-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.countdown-icon {
    font-size: 2.5rem;
    animation: tick 1s ease-in-out infinite;
}

.countdown-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    text-align: center;
    max-width: 260px;
}

.countdown-timer {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-progress {
    width: 200px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease-in-out;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s ease-in-out infinite;
}

/* 動畫效果 */
@keyframes breathe {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
    }
}

@keyframes tick {
    0%, 100% { 
        transform: rotate(0deg); 
    }
    50% { 
        transform: rotate(10deg); 
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 響應式設計 */
@media screen and (max-width: 480px) {
    .awareness-section,
    .countdown-section {
        padding: 1.5rem 0.5rem;
    }
    
    .awareness-icon {
        font-size: 2.5rem;
        width: 40vw;    /* 視窗寬度的15% */
        height: 40vw;   /* 保持正方形 */
    }
    
    .countdown-icon {
        font-size: 2rem;
    }
    
    .countdown-timer {
        font-size: 2.5rem;
    }
    
    .countdown-progress {
        width: 160px;
    }
    
    .awareness-text,
    .countdown-text {
        font-size: 0.95rem;
        max-width: 240px;
    }
}

/* 修煉步驟checkbox樣式 */
.action-steps {
    margin: 1rem 0;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.action-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.action-step-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.4);
}

.step-checkbox {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    flex: 1;
    line-height: 1.5;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    color: #333 !important;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 勾選後的樣式 */
.action-step-item.completed {
    background: rgba(128, 128, 128, 0.1);
    border-color: rgba(128, 128, 128, 0.3);
}

.action-step-item.completed .step-number {
    background: #888;
}

.action-step-item.completed .step-text {
    color: #888;
    text-decoration: line-through;
}

.action-step-item.completed .step-checkbox {
    accent-color: #888;
}

/* 手機版響應式調整 */
@media screen and (max-width: 480px) {
    .action-step-item {
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .step-checkbox {
        width: 16px;
        height: 16px;
    }
    
    .step-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .step-text {
        font-size: 0.9rem;
    }
}

/* 推薦任務步驟樣式（純顯示，無checkbox） */
.recommendation-steps {
    margin: 1rem 0;
}

.recommendation-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.recommendation-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    border-left: 3px solid #667eea;
    transition: all 0.3s ease;
}

.recommendation-step-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(2px);
}

.recommendation-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 1px;
}

.recommendation-step-text {
    flex: 1;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* 推薦任務手機版響應式調整 */
@media screen and (max-width: 480px) {
    .recommendation-step-item {
        padding: 0.5rem 0.6rem;
        gap: 0.6rem;
    }
    
    .recommendation-step-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .recommendation-step-text {
        font-size: 0.85rem;
    }
    
    /* 任务分类标题手机版调整 */
    .task-category-header {
        margin: -0.8rem -1rem 1rem -1rem;
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }
    
    .category-icon {
        font-size: 1.3rem;
    }
    
    .category-title {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }
    
    .task-subtitle {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
}

/* 沉浸式任務執行界面 */
.task-immersion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c2c54 0%, #40407a 50%, #706fd3 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    opacity: 0.9;
}

/* 承諾瞬間界面 */
.commitment-moment {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeInScale 0.8s ease-out;
}

.task-focus-container {
    text-align: center;
    max-width: 90%;
    animation: focusPulse 2s ease-in-out infinite;
}

.task-title-large {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    line-height: 1.2;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.cultivation-timer {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timer-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: timerPulse 1s ease-in-out infinite;
}

.timer-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.timer-countdown {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: countdownPulse 1s ease-in-out infinite;
}

.master-quote {
    font-size: 1.5rem;
    font-style: italic;
    margin: 2rem 0;
    opacity: 0.9;
    animation: quoteFade 2s ease-in-out infinite alternate;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.exit-task-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.exit-task-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* 行動階段的退出按鈕 */
.action-exit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    z-index: 10;
}

.action-exit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* 行動階段界面 */
.action-phase {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.action-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.task-steps {
    margin-bottom: 2rem;
    flex: 1;
}

.task-steps h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.steps-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

/* 沉浸式任務界面的步驟樣式 */
.task-immersion-overlay .step-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #ffd700;
    font-size: 1.1rem;
    line-height: 1.6;
    color: white !important;
}

.task-immersion-overlay .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #ffd700;
    color: #1a1a2e;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.task-immersion-overlay .step-text {
    color: white !important;
    font-size: 1.1rem;
    line-height: 1.6;
}

.step-item:last-child {
    margin-bottom: 0;
}

.action-actions {
    flex-shrink: 0;
    margin-top: auto;
    padding: 1rem 0;
}


/* 動畫效果 */
@keyframes fadeInScale {
    0% { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes focusPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 30px rgba(255, 255, 255, 0.3); }
    100% { text-shadow: 0 0 50px rgba(255, 255, 255, 0.6); }
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes quoteFade {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}


/* 響應式設計 */
@media screen and (max-width: 768px) {
    .task-title-large {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .timer-countdown {
        font-size: 2.5rem;
    }
    
    .master-quote {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    /* 手機版沉浸式界面調整 */
    .task-immersion-overlay {
        padding: 0.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .task-focus-container {
        max-width: 100%;
        padding: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .exit-task-btn,
    .action-exit-btn {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
        z-index: 100;
    }
    
    /* 行動階段手機版調整 */
    .action-phase {
        padding: 0.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .action-container {
        padding: 0.5rem;
        max-width: 100%;
    }
    
    .task-steps h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .steps-list {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .step-item {
        padding: 0.8rem;
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .step-number {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
        margin-right: 0.8rem;
    }
    
    .step-text {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .action-actions {
        margin-top: 1rem;
        padding-bottom: 2rem;
    }
    
    .btn-large {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* 手機版輸入框修正 - 防止縮放 */
    .modal textarea,
    .modal input[type="text"],
    .modal input[type="email"],
    .modal input[type="password"],
    .modal input[type="number"] {
        font-size: 16px !important;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }
    
    /* 修煉完成彈窗的手機版調整 */
    .completion-modal {
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .completion-modal .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .reflection-section textarea {
        font-size: 16px !important;
        min-height: 100px;
        padding: 0.8rem;
    }
    
    .reflection-input-container textarea {
        font-size: 16px !important;
        min-height: 100px;
        padding: 0.8rem;
    }
}

/* 角色資訊頁面樣式 */
.character-info-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px); /* 與footer切齊 */
    overflow: hidden; /* 禁止滑動 */
    z-index: 998; /* 低於底部導航的z-index: 999 */
    background: transparent; /* 透明背景，只顯示Lottie */
}

.character-info-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden; /* 禁止容器內滑動 */
    touch-action: none; /* 禁止觸控手勢 */
}

.character-lottie-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.character-info-content {
    display: none; /* 完全隱藏內容窗格 */
}

/* 五行素質區樣式 */
.five-elements-section {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 90%;
    width: 100%;
}

.section-title {
    text-align: center;
    color: #4a5568;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    align-items: center;
}

.element-circle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.element-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.element-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.element-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 2px;
}

.element-value {
    font-size: 0.6rem;
    color: #718096;
    text-align: center;
}

.current-value {
    font-weight: 600;
    color: #2d3748;
}

.element-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 360deg);
}

.element-progress {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--element-color) 0deg, var(--element-color) calc(var(--progress) * 3.6deg), #e2e8f0 calc(var(--progress) * 3.6deg), #e2e8f0 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 各元素顏色 */
.element-circle.fire {
    --element-color: #ff6b35;
}

.element-circle.water {
    --element-color: #3b82f6;
}

.element-circle.wood {
    --element-color: #10b981;
}

.element-circle.earth {
    --element-color: #d97706;
}

.element-circle.metal {
    --element-color: #6b7280;
}

/* 屬性詳解模態框樣式 */
.element-detail-modal {
    max-width: 280px;
    width: 90%;
    margin: 0 auto;
}

.element-detail-content {
    text-align: center;
    padding: 0.8rem;
}

.element-detail-content h4 {
    color: #4a5568;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.element-detail-content p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.element-detail-content .element-description {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.element-characteristics h5 {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.characteristics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.characteristic-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 狀態標籤區域樣式 */
.status-tags-section {
    position: absolute;
    top: 50%;
    right: 20px; /* 移到右側 */
    transform: translateY(-50%); /* 垂直居中 */
    z-index: 10;
    background: transparent; /* 透明背景，無框 */
    width: auto;
}

.status-tags-container {
    display: flex;
    flex-direction: column; /* 垂直排列 */
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
}

.status-tag {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 120px; /* 固定寬度 */
    background: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.status-tag.positive {
    background: linear-gradient(135deg, #90ee90, #98fb98); /* 淺綠色，與木頭色協調 */
    border-color: #228b22;
}

.status-tag.negative {
    background: linear-gradient(135deg, #ffb6c1, #ffa0a0); /* 淺紅色，與木頭色協調 */
    border-color: #dc143c;
}

.status-tag.neutral {
    background: linear-gradient(135deg, #b0e0e6, #87ceeb); /* 淺藍色，與木頭色協調 */
    border-color: #4682b4;
}

.tag-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.tag-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tag-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.1rem;
    line-height: 1.1;
}

.tag-effect {
    font-size: 0.6rem;
    color: #718096;
    font-weight: 500;
}

/* 符籙式設計效果 */
.status-tag::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 14px;
    z-index: -1;
    opacity: 0.6;
}

.status-tag.positive::before {
    background: linear-gradient(45deg, transparent, rgba(40, 167, 69, 0.2), transparent);
}

.status-tag.negative::before {
    background: linear-gradient(45deg, transparent, rgba(220, 53, 69, 0.2), transparent);
}

.status-tag.neutral::before {
    background: linear-gradient(45deg, transparent, rgba(23, 162, 184, 0.2), transparent);
}

/* 手機版狀態標籤優化 */
@media (max-width: 768px) {
    .status-tags-section {
        right: 10px; /* 手機版右側邊距 */
        top: 50%;
        transform: translateY(-50%);
    }
    
    .status-tags-container {
        gap: 0.6rem;
    }
    
    .status-tag {
        width: 100px; /* 手機版稍小 */
        padding: 0.3rem 0.6rem;
    }
    
    .tag-icon {
        font-size: 0.9rem;
    }
    
    .tag-name {
        font-size: 0.6rem;
    }
    
    .tag-effect {
        font-size: 0.5rem;
    }
}

/* 狀態詳解樣式 */
.status-detail {
    text-align: center;
    padding: 0.6rem;
}

.status-detail .status-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.status-detail h4 {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.status-detail p {
    color: #718096;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.status-info {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.6rem;
    border-radius: 8px;
    text-align: left;
}

.info-item {
    margin-bottom: 0.4rem;
    color: #4a5568;
    font-size: 0.75rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: #2d3748;
    font-weight: 600;
}

/* 手機版五行素質區優化 */
@media (max-width: 768px) {
    .five-elements-section {
        top: 10px;
        padding: 1rem;
        max-width: 95%;
    }
    
    .elements-grid {
        gap: 0.5rem;
    }
    
    .element-circle {
        width: 50px;
        height: 50px;
    }
    
    .element-icon {
        font-size: 1.2rem;
    }
    
    .element-name {
        font-size: 0.6rem;
    }
    
    .element-value {
        font-size: 0.5rem;
    }
}

.character-info-content h3 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.character-info-content p {
    color: #718096;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 移除遊戲風格裝飾 */

/* 手機版角色資訊頁面 - 完全禁止滑動 */
@media (max-width: 768px) {
    .character-info-page {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 80px) !important; /* 與footer切齊 */
        overflow: hidden !important;
        touch-action: none !important;
        background: transparent !important;
        z-index: 998 !important; /* 低於底部導航的z-index: 999 */
    }
    
    .character-info-container {
        height: 100% !important;
        overflow: hidden !important;
        touch-action: none !important;
    }
    
    /* 防止iOS Safari的彈性滾動 */
    .character-info-page * {
        -webkit-overflow-scrolling: touch !important;
        touch-action: none !important;
    }
}

/* 屬性紀錄頁面樣式 */
.attribute-records-page {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    padding: 1rem;
}

.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

/* 全局返回按鈕樣式 */
.back-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.back-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.back-btn:hover::before {
    left: 100%;
}

.back-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
}

/* SVG 返回箭頭樣式 */
.back-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.back-btn:hover .back-icon {
    transform: translateX(-2px);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-left: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* 角色資訊頁面左下角返回按鈕 */
.character-back-btn {
    position: fixed;
    bottom: 100px; /* 在底部導航上方 */
    left: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    z-index: 1000;
    overflow: hidden;
}

.character-back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.character-back-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.character-back-btn:hover::before {
    left: 100%;
}

.character-back-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
}

.character-back-btn .back-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.character-back-btn:hover .back-icon {
    transform: translateX(-3px);
}

.character-back-btn .back-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 手機版返回按鈕優化 */
@media (max-width: 768px) {
    .back-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .back-icon {
        width: 18px;
        height: 18px;
    }
    
    .page-title {
        font-size: 1.3rem;
        margin-left: 0.8rem;
    }
    
    /* 手機版角色資訊返回按鈕 */
    .character-back-btn {
        bottom: 90px;
        left: 15px;
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }
    
    .character-back-btn .back-icon {
        width: 18px;
        height: 18px;
    }
}

.current-attributes-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* 屬性記錄頁面 - 當前屬性顯示 - 最高优先级 */
.attribute-records-page .attributes-display,
.attribute-records-page .current-attributes-section .attributes-display {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.75rem;
    width: 100%;
}

/* 强制移动端4x1布局 */
@media screen and (max-width: 768px) {
    .attribute-records-page .attributes-display,
    .attribute-records-page .current-attributes-section .attributes-display,
    .attribute-records-page .attributes-display[style] {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-template-rows: 1fr !important;
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 强制每个属性卡片不换行 */
    .attribute-records-page .attr-card {
        flex-shrink: 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }
}

.attr-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 80px;
}

.attr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.attr-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.attr-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    text-align: center;
}

.attr-name {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

.attr-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    width: 100%;
}

.filters-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-date {
    display: flex;
    gap: 1rem;
}

.custom-date .filter-group {
    flex: 1;
    margin-bottom: 0;
}

.records-section {
    margin-bottom: 2rem;
}

.records-list {
    margin-bottom: 1rem;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: #666;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-records {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-records-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-records-text {
    font-size: 1.1rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
    background: #fdf2f2;
    border-radius: 8px;
    margin: 1rem 0;
}

.attribute-record-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.2s, box-shadow 0.2s;
}

.attribute-record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 天命卡记录特殊样式 */
.destiny-card-record {
    border-left-color: #9b59b6;
    background: linear-gradient(135deg, #f8f4ff 0%, #f0e6ff 100%);
}

.destiny-card-record .record-source {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.record-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.record-date {
    font-size: 0.9rem;
    color: #666;
}

.record-source {
    font-size: 0.8rem;
    color: #667eea;
    background: #f0f4ff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.record-content {
    margin-bottom: 1rem;
}

.record-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.record-mood,
.record-description,
.record-reflection {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.record-reflection {
    font-style: italic;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.record-changes {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.changes-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.75rem;
}

.changes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.attribute-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.attribute-change.positive {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.attribute-change.negative {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.attr-change {
    font-weight: 600;
}

.load-more-section {
    text-align: center;
    margin-top: 2rem;
}

.load-more-section .btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more-section .btn:hover {
    background: #5a6fd8;
}

/* 手機版屬性紀錄頁面優化 */
@media (max-width: 768px) {
    .attribute-records-page {
        padding: 0.75rem;
    }
    
    .attribute-records-page .attributes-display {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .attribute-records-page .attr-card {
        min-width: 0;
        flex-shrink: 0;
    }
    
    /* 强制4x1布局 - 最高优先级 */
    .attribute-records-page .current-attributes-section .attributes-display {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-template-rows: 1fr !important;
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .attr-card {
        padding: 0.5rem;
        min-height: 70px;
        justify-content: center;
        align-items: center;
    }
    
    .attr-icon {
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .attr-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        width: 100%;
        text-align: center;
    }
    
    .attr-name {
        font-size: 0.7rem;
        text-align: center;
        width: 100%;
    }
    
    .attr-value {
        font-size: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .custom-date {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .attribute-record-item {
        padding: 1rem;
    }
    
    .record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .changes-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .attribute-change {
        justify-content: center;
    }
}

/* 四大修煉任務按鈕區域 */
.task-buttons-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.task-buttons-container {
    max-width: 480px;
    margin: 0 auto;
}

.task-buttons-header {
    text-align: center;
    margin-bottom: 2rem;
}

.task-buttons-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.task-buttons-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 400;
}

.task-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.task-button {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 1rem;
    width: 100%;
    height: 100px;
    padding: 1rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.task-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.task-button:active {
    transform: translateY(-2px);
}

.task-button-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    z-index: 2;
}

.task-button-content {
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.task-button-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
    line-height: 1.2;
}

.task-button-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.task-button-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.task-button-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.task-button:hover .task-button-glow {
    opacity: 1;
}

/* 不同類型的按鈕顏色 */
.life-force-btn {
    border: 2px solid rgba(255, 107, 107, 0.3);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.life-force-btn:hover {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    border-color: #ff6b6b;
    color: white;
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(255, 107, 107, 0.3);
}

.life-force-btn:hover .task-button-title {
    color: white;
}

.enlightenment-btn {
    border: 2px solid rgba(78, 205, 196, 0.3);
    background: linear-gradient(135deg, #f0fffe 0%, #e8f8f7 100%);
}

.enlightenment-btn:hover {
    background: linear-gradient(135deg, #4ecdc4, #6dd5d0);
    border-color: #4ecdc4;
    color: white;
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(78, 205, 196, 0.3);
}

.enlightenment-btn:hover .task-button-title {
    color: white;
}

.fortune-btn {
    border: 2px solid rgba(69, 183, 209, 0.3);
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f4ff 100%);
}

.fortune-btn:hover {
    background: linear-gradient(135deg, #45b7d1, #6bc5d8);
    border-color: #45b7d1;
    color: white;
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(69, 183, 209, 0.3);
}

.fortune-btn:hover .task-button-title {
    color: white;
}

.karma-btn {
    border: 2px solid rgba(150, 206, 180, 0.3);
    background: linear-gradient(135deg, #f0fff4 0%, #e8f8f0 100%);
}

.karma-btn:hover {
    background: linear-gradient(135deg, #96ceb4, #a8d5c1);
    border-color: #96ceb4;
    color: white;
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(150, 206, 180, 0.3);
}

.karma-btn:hover .task-button-title {
    color: white;
}

/* 修煉任務卡模態框 */
.task-card-modal {
    max-width: 500px;
    width: 95%;
    padding: 0;
}

.task-card-wrapper {
    padding: 1rem;
}

.task-card-container {
    position: relative;
    height: 500px;
    margin: 0;
    border-radius: 1.5rem;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.task-card-back,
.task-card-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease;
    backface-visibility: hidden;
}

.task-card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    opacity: 1;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.task-card-front {
    background: white;
    color: #333;
    opacity: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* 任務卡背面樣式 */
.task-card-back .card-back-design {
    text-align: center;
    padding: 2rem;
}

.task-card-back .mystical-symbol {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.task-card-back .card-back-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.task-card-back .card-click-hint {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 任務卡正面樣式 */
.task-card-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.task-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.task-card-content {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 0;
}

.cycle-task-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.cycle-task-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 350px;
}

.cycle-task-reward {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 1.5rem;
    display: inline-block;
}

.task-card-footer {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.cycle-task-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.cycle-task-actions .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.75rem;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cycle-task-actions .btn-outline {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #666;
}

.cycle-task-actions .btn-outline:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    color: #333;
}

.cycle-task-actions .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cycle-task-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1rem;
}

.task-card-back .card-back-design {
    text-align: center;
}

.task-card-back .mystical-symbol {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.task-card-back .card-back-text {
    font-size: 1.2rem;
    font-weight: 600;
}

.task-card-back .card-click-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

.task-card-back {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.task-card-back:hover {
    transform: scale(1.02);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.task-card-type {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
}

.task-card-difficulty {
    font-size: 0.8rem;
    background: #e8f5e8;
    color: #4caf50;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
}

.task-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.task-card-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.task-card-instruction {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.instruction-text {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
    text-align: center;
}

.task-card-actions {
    display: flex;
    justify-content: center;
}

.task-card-draw-section {
    text-align: center;
}

.draw-instruction {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* 響應式設計 */
@media (max-width: 480px) {
    .task-buttons-section {
        padding: 1.5rem 1rem;
        margin-bottom: 0.5rem;
    }
    
    .task-buttons-title {
        font-size: 1.5rem;
    }
    
    .task-buttons-subtitle {
        font-size: 0.9rem;
    }
    
    .task-buttons-grid {
        gap: 0.5rem;
    }
    
    .task-button {
        height: 80px;
        padding: 0.75rem 0.25rem;
    }
    
    .task-button-icon {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }
    
    .task-button-title {
        font-size: 0.8rem;
    }
    
    .task-card-modal {
        max-width: 95%;
        margin: 1rem;
    }
    
    .task-card-container {
        height: 450px;
    }
    
    .task-card-content {
        padding: 1rem 1.5rem;
    }
    
    .cycle-task-title {
        font-size: 1.3rem;
    }
    
    .cycle-task-description {
        font-size: 0.85rem;
        max-width: 250px;
    }
    
    .cycle-task-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cycle-task-actions .btn {
        min-width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    /* 超標挑戰移動端優化 */
    .bonus-title {
        font-size: 2.2rem;
    }
    
    .bonus-message {
        font-size: 1.4rem;
    }
    
    .bonus-timer {
        font-size: 3rem;
    }
    
    .btn-bonus-complete {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
        min-width: 250px;
    }
}

/* 任務流程樣式 */
.task-flow-modal {
    max-width: 500px;
    width: 90%;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.subcategory-btn {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.subcategory-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.subcategory-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subcategory-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subcategory-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 任務卡展示樣式 */
.task-card-modal {
    max-width: 400px;
    width: 90%;
}

.cycle-task-display {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 1rem 0;
    text-align: center;
}

.cycle-task-content {
    margin-bottom: 1.5rem;
}

.cycle-task-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.cycle-task-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.task-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
}

.task-card-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 任務執行界面樣式 - 參考承諾完成任務設計 */
.task-execution-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
    border-radius: 0;
    margin: 0;
    padding: 0;
    max-width: none;
}

.execution-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.execution-content {
    text-align: center;
    color: white;
    padding: 3rem 2rem;
    max-width: 600px;
    width: 90%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.task-title-large {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.task-description {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.execution-timer {
    font-size: 5rem;
    font-weight: 700;
    color: #fff;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem 3rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    min-width: 200px;
}

.execution-actions {
    margin-top: 3rem;
}

.execution-actions .btn {
    font-size: 1.4rem;
    padding: 1.5rem 3rem;
    border-radius: 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.execution-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* 完成回報樣式 */
.completion-modal {
    max-width: 400px;
    width: 90%;
}

.completion-content {
    text-align: center;
    padding: 2rem 0;
}

.completion-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.completion-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.completion-extra {
    font-size: 1.1rem;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-weight: 500;
}

.attribute-gain {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.completion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 超標挑戰樣式 - 沉浸式設計 */
.bonus-modal {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.bonus-overlay {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bonus-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.bonus-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: particleFloat 6s ease-in-out infinite;
}

.bonus-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
}

.bonus-header {
    margin-bottom: 3rem;
}

.bonus-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: iconPulse 2s ease-in-out infinite;
}

.bonus-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bonus-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.bonus-message-container {
    margin-bottom: 3rem;
}

.bonus-message {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bonus-encouragement {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

.bonus-timer-container {
    margin-bottom: 3rem;
}

.bonus-timer {
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bonus-timer-label {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}

.bonus-actions {
    display: flex;
    justify-content: center;
}

.btn-bonus-complete {
    position: relative;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    border: none;
    color: white;
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 2rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.btn-bonus-complete:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.6);
}

.btn-bonus-complete:active {
    transform: translateY(-1px);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: buttonGlow 2s infinite;
}

/* 動畫效果 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes buttonGlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 超標完成特效 */
.bonus-completion-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: bonusEffectFadeIn 0.5s ease-out;
}

.bonus-effect-content {
    text-align: center;
    color: white;
    animation: bonusEffectPulse 1s ease-in-out infinite;
}

.bonus-effect-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: bonusEffectBounce 0.6s ease-out;
}

.bonus-effect-text {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ff6b6b, #ffa500, #ff6b6b);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bonusEffectGradient 2s ease-in-out infinite;
}

.bonus-effect-reward {
    font-size: 3rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
    animation: bonusEffectReward 0.8s ease-out;
}

.bonus-effect-rarity {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* 稀有度特效 */
.bonus-effect-common .bonus-effect-text {
    color: #4CAF50;
}

.bonus-effect-common .bonus-effect-reward {
    color: #4CAF50;
    text-shadow: 0 4px 20px rgba(76, 175, 80, 0.6);
}

.bonus-effect-uncommon .bonus-effect-text {
    color: #2196F3;
    animation: bonusEffectGradient 2s ease-in-out infinite;
}

.bonus-effect-uncommon .bonus-effect-reward {
    color: #2196F3;
    text-shadow: 0 4px 20px rgba(33, 150, 243, 0.6);
}

.bonus-effect-rare .bonus-effect-text {
    color: #9C27B0;
    animation: bonusEffectRare 1.5s ease-in-out infinite;
}

.bonus-effect-rare .bonus-effect-reward {
    color: #9C27B0;
    text-shadow: 0 4px 20px rgba(156, 39, 176, 0.6);
}

.bonus-effect-legendary .bonus-effect-text {
    color: #FF9800;
    animation: bonusEffectLegendary 1s ease-in-out infinite;
}

.bonus-effect-legendary .bonus-effect-reward {
    color: #FF9800;
    text-shadow: 0 4px 20px rgba(255, 152, 0, 0.8);
    animation: bonusEffectLegendaryReward 1.5s ease-in-out infinite;
}

.bonus-effect-legendary .bonus-effect-rarity {
    color: #FF9800;
    font-weight: 800;
    animation: bonusEffectLegendaryRarity 2s ease-in-out infinite;
}

@keyframes bonusEffectFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes bonusEffectPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bonusEffectBounce {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes bonusEffectGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bonusEffectReward {
    0% { transform: scale(0) translateY(50px); opacity: 0; }
    50% { transform: scale(1.2) translateY(-10px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* 稀有度動畫 */
@keyframes bonusEffectRare {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(1deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
}

@keyframes bonusEffectLegendary {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bonusEffectLegendaryReward {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.2) rotate(3deg); }
}

@keyframes bonusEffectLegendaryRarity {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

/* 智慧回饋樣式 */
.wisdom-reward-modal {
    max-width: 400px;
    width: 90%;
}



.card-image {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: 1rem;
    opacity: 0.9;
}

.wisdom-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 響應式設計 */
@media (max-width: 480px) {
    .subcategory-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .subcategory-btn {
        padding: 1rem;
        min-height: 80px;
    }
    
    .subcategory-icon {
        font-size: 1.5rem;
    }
    
    .subcategory-title {
        font-size: 0.9rem;
    }
    
    .subcategory-desc {
        font-size: 0.75rem;
    }
    
    .cycle-task-display {
        padding: 1.5rem;
    }
    
    .cycle-task-title {
        font-size: 1.8rem;
    }
    
    .cycle-task-description {
        font-size: 1.5rem;
    }
    
    .execution-timer {
        font-size: 2.5rem;
    }
    
    .bonus-timer {
        font-size: 2rem;
    }
    
    .completion-actions,
    .wisdom-actions {
        flex-direction: column;
    }
}

/* 精靈圖動畫樣式 - 現在由JavaScript控制 */
.sprite-animation {
    position: fixed;
    top: 50%;
    right: -80px; /* 桌面版也調整到期待位置 */
    transform: translateY(-50%) scale(0.3); /* 簡化transform */
    z-index: 10000;
    pointer-events: none;
    border-radius: 0; /* 改為方形，不切掉動畫 */
    overflow: visible; /* 允許超出部分顯示 */
    transform-origin: center center; /* 縮放從中心開始 */
    display: none; /* 默認隱藏，由JavaScript控制顯示 */
}

/* 手機版響應式 */
@media screen and (max-width: 480px) {
    .sprite-animation {
        right: -80px; /* 手機版更靠右側 */
        transform: translateY(-50%) scale(0.5); /* 手機版縮小到50% */
    }
}

/* 五行力提升按鈕樣式 */
.element-enhancement-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.enhancement-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin-bottom: 1rem;
}

.enhancement-content {
    text-align: center;
}

.enhancement-title {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.enhancement-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.enhancement-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.enhancement-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.enhancement-btn:active {
    transform: translateY(0);
}

.enhancement-btn .btn-icon {
    font-size: 1rem;
}

.enhancement-btn .btn-text {
    font-size: 0.9rem;
}

/* 手機版適配 */
@media (max-width: 768px) {
    .enhancement-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .enhancement-title {
        font-size: 1rem;
    }
    
    .enhancement-description {
        font-size: 0.85rem;
    }
}

/* 遊戲說明頁面樣式 */
.game-guide-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
    overflow-y: auto;
    padding-bottom: 80px; /* 為底部導航留出空間 */
}

.game-guide-container {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.guide-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.guide-title {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.guide-subtitle {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-subtitle::before {
    content: "📖";
    font-size: 1.2rem;
}

.guide-text {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.guide-list {
    color: #4a5568;
    line-height: 1.6;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.guide-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.guide-list li::before {
    content: "✨";
    position: absolute;
    left: -1.5rem;
    top: 0;
}

.guide-method {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 3px solid #667eea;
}

.method-title {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.method-title::before {
    content: "🎯";
    font-size: 1rem;
}

.guide-special {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.special-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.special-title::before {
    content: "🌟";
    font-size: 1rem;
}

.guide-special .guide-text {
    color: white;
    font-weight: 500;
}

/* 手機版適配 */
@media (max-width: 768px) {
    .game-guide-container {
        padding: 0.5rem;
    }
    
    .guide-content {
        padding: 1.5rem;
    }
    
    .guide-title {
        font-size: 1.5rem;
    }
    
    .guide-subtitle {
        font-size: 1.1rem;
    }
    
    .guide-item {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .guide-method {
        padding: 1rem;
    }
    
    .guide-special {
        padding: 1rem;
    }
}

/* 遊戲說明頁面的底部導航樣式 */
#gameGuideBottomNavigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001; /* 高於遊戲說明頁面 */
}

/* 手機版適配 - 遊戲說明頁面底部導航 */
@media (max-width: 768px) {
    #gameGuideBottomNavigation {
        max-width: 100%;
    }
}

/* ===== 社群頁面樣式 ===== */

/* 社群頁面容器 */
.community-container {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
    background: #f0f2f5;
    min-height: 100vh;
}

/* 標籤樣式 */
.hashtag {
    color: #1da1f2;
    font-weight: 600;
    text-decoration: none;
    background: rgba(29, 161, 242, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    display: inline-block;
    margin: 1px;
}

.hashtag:hover {
    background: rgba(29, 161, 242, 0.2);
    text-decoration: none;
}

/* 標籤提示樣式 */
.hashtag-hint {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(29, 161, 242, 0.05);
    border-radius: 6px;
    border-left: 3px solid #1da1f2;
}

.hashtag-hint small {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 評論區域樣式 */
.comment-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-top: 1px solid #e1e5e9;
}

.comment-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.comment-input textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
}

.comment-input textarea:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.1);
}

.comment-submit-btn {
    padding: 0.5rem 1rem;
    background: #1da1f2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.3s ease;
}

.comment-submit-btn:hover {
    background: #0d8bd9;
}

.comment-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.comment-author-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.comment-time {
    color: #666;
    font-size: 0.8rem;
}

.comment-content {
    color: #555;
    line-height: 1.4;
    font-size: 0.9rem;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 1rem;
}

/* 功能按鈕區域 */
.community-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
    text-align: center;
    min-height: 50px;
}

.action-button:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.action-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-button.primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.action-button .btn-icon {
    font-size: 1.1rem;
}

.action-button .btn-text {
    font-size: 0.9rem;
}

/* 瀑布流分享列表 */
.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 社群標題區域 */
.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.community-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text {
    flex: 1;
}

.community-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.community-subtitle {
    color: #7f8c8d;
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

.community-stats {
    text-align: right;
}

.stats-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 發文區域 */
.post-creation-section {
    margin-bottom: 2rem;
}

.post-form-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.post-form-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.form-icon {
    font-size: 1.5rem;
}

.form-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.post-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* 分享列表區域 */
.posts-section {
    margin-bottom: 2rem;
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.posts-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #2c3e50;
}

/* 貼文卡片 */
.post-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.post-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.post-time {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.post-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #2c3e50;
}

.category-icon {
    font-size: 1rem;
}

.post-content {
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.post-text {
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.post-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: none;
    border-radius: 20px;
    color: #5a6c7d;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.action-btn.like-btn:hover {
    background: #ffe6e6;
    color: #e74c3c;
}

.action-btn.comment-btn:hover {
    background: #e6f3ff;
    color: #3498db;
}

.action-btn.share-btn:hover {
    background: #e6f7e6;
    color: #27ae60;
}

/* 載入和空狀態 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1rem;
    color: #7f8c8d;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    color: #7f8c8d;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.empty-action {
    margin-top: 1rem;
}

/* 社群頁面底部導航 */
#communityBottomNavigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

/* 創建貼文模態框 */
.create-post-modal {
    max-width: 600px;
    width: 90%;
}

.create-post-modal .post-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.create-post-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.create-post-modal .form-group label {
    font-weight: 600;
    color: #1c1e21;
    font-size: 0.9rem;
}

.create-post-modal .form-group input,
.create-post-modal .form-group textarea,
.create-post-modal .form-group select {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.create-post-modal .form-group input:focus,
.create-post-modal .form-group textarea:focus,
.create-post-modal .form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.create-post-modal .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* 手機版適配 */
@media (max-width: 768px) {
    .community-container {
        padding: 0.75rem;
    }
    
    .community-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .action-button {
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
        min-height: 45px;
    }
    
    .action-button .btn-text {
        font-size: 0.75rem;
    }
    
    .post-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .action-btn {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
    
    .create-post-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .create-post-modal .form-actions {
        flex-direction: column;
    }
    
    #communityBottomNavigation {
        max-width: 100%;
    }
}

/* 安裝應用模態框樣式 */
.install-app-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.install-app-modal .modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.install-app-modal .modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.install-instructions {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
}

.install-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.install-section:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.install-section h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.step-text {
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

.install-note {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px;
    border-left: 4px solid #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.install-note p {
    color: #4a5568;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.install-features {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.1), rgba(102, 126, 234, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(118, 75, 162, 0.2);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.1);
}

.install-features h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.install-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.install-features li {
    color: #4a5568;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.install-features li::before {
    content: "✨";
    font-size: 1rem;
}

.install-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(102, 126, 234, 0.2);
}

.install-actions .btn {
    flex: 1;
    max-width: 200px;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.install-actions .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.install-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.install-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.install-actions .btn-secondary:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
}

/* 安裝可用按鈕特殊樣式 */
.install-actions .btn.install-available {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    animation: installPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.install-actions .btn.install-available:hover {
    background: linear-gradient(135deg, #43a047, #5cb85c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .install-app-modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .install-section {
        padding: 1rem;
    }
    
    .install-steps {
        gap: 0.6rem;
    }
    
    .step {
        padding: 0.6rem;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .step-text {
        font-size: 0.9rem;
    }
    
    .install-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .install-actions .btn {
        max-width: none;
    }
}

/* 安裝提示動畫 */
@keyframes installPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.install-section.animate {
    animation: installPulse 2s infinite;
}

/* 安裝狀態指示器 */
.install-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.install-status.available {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(139, 195, 74, 0.15));
    border: 2px solid rgba(76, 175, 80, 0.3);
    color: #2e7d32;
}

.install-status.available:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(139, 195, 74, 0.2));
    border-color: rgba(76, 175, 80, 0.5);
    transform: translateY(-1px);
}

.install-status.installed {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(103, 58, 183, 0.15));
    border: 2px solid rgba(33, 150, 243, 0.3);
    color: #1565c0;
}

.install-status.installed:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(103, 58, 183, 0.2));
    border-color: rgba(33, 150, 243, 0.5);
    transform: translateY(-1px);
}

.install-status.unavailable {
    background: linear-gradient(135deg, rgba(158, 158, 158, 0.15), rgba(189, 189, 189, 0.15));
    border: 2px solid rgba(158, 158, 158, 0.3);
    color: #616161;
}

.install-status.unavailable:hover {
    background: linear-gradient(135deg, rgba(158, 158, 158, 0.2), rgba(189, 189, 189, 0.2));
    border-color: rgba(158, 158, 158, 0.5);
}

.install-status::before {
    content: "📱";
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}


