/* 解鎖系統樣式 - 簡化版本，主要依賴 Tailwind CSS */

/* 解鎖頁面容器 */
#unlock-screen {
    /* 移除多餘的樣式，使用 Tailwind CSS 類別 */
}

/* Podcast對話框樣式 */
.podcast-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    pointer-events: auto;
}

/* Podcast解鎖通知樣式 */
.podcast-unlock-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    pointer-events: auto;
}

.podcast-unlock-content {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 90%;
    margin: 20px;
    position: relative;
    z-index: 3001;
    border: 1px solid rgba(147, 51, 234, 0.3);
    animation: podcastUnlockIn 0.5s ease-out;
}

@keyframes podcastUnlockIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.podcast-dialog {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 90%;
    margin: 20px;
    position: relative;
    z-index: 3001;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.podcast-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(147, 51, 234, 0.3);
}

.podcast-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.podcast-close-btn:hover {
    background: rgba(147, 51, 234, 0.2);
    transform: scale(1.1);
}

.podcast-dialog-content {
    text-align: center;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .podcast-dialog {
        padding: 20px;
        margin: 10px;
    }
    
    .podcast-dialog-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .podcast-dialog {
        padding: 15px;
        margin: 5px;
    }
    
    .podcast-dialog-header h3 {
        font-size: 18px;
    }
    
    .podcast-close-btn {
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
}

/* 移除舊的樣式類別，現在使用 Tailwind CSS */
.unlock-header,
.unlock-progress,
.progress-bar-main,
.progress-fill-main,
.progress-count,
.category-tabs,
.category-tab,
.btn-close {
    /* 這些樣式現在都由 Tailwind CSS 處理 */
}

/* 保留一些特殊效果的樣式 */
.career-card.expanded .description {
    display: block;
}

/* 展開狀態的視覺效果 */
.career-card.expanded {
    /* 展開時稍微增加陰影 */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    /* 展開時稍微增加邊框 */
    border: 1px solid rgba(255, 105, 180, 0.3);
}

/* 展開按鈕的視覺效果 */
.desc-toggle-btn {
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.desc-toggle-btn:hover {
    background-color: rgba(255, 105, 180, 0.2);
}

/* 確保卡片有適當的最小高度 */
.career-card {
    min-height: 200px;
}

/* 通知視窗樣式 - 修復跑版問題 */
/* 移除舊的 unlock-animation 樣式，因為已經整合到 unlock-notice */

/* 召喚角色通知視窗樣式 */
.unlock-notice-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3000 !important;
    /* 確保顯示在螢幕中央 */
    pointer-events: auto !important;
}

.unlock-notice-content {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 90%;
    margin: 20px;
    /* 確保內容正確顯示 */
    position: relative !important;
    z-index: 3001 !important;
}

.unlock-notice-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.unlock-notice-text h3 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: #ffc8f2;
}

.unlock-notice-text p {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    opacity: 0.8;
}

.btn-confirm-notice {
    background: linear-gradient(135deg, #ff9de2 0%, #ffc8f2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(255, 157, 226, 0.3);
}

.btn-confirm-notice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 157, 226, 0.4);
}

/* 確認對話框樣式 */
.confirm-dialog-overlay,
.type-details-overlay,
.progress-details-overlay,
.history-overlay,
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-dialog,
.type-details,
.progress-details,
.history-details,
.settings-details {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.details-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.dialog-content,
.details-content {
    margin-bottom: 20px;
    line-height: 1.6;
}

.dialog-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.dialog-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm {
    background: #4CAF50;
    color: white;
}

.btn-cancel {
    background: #9E9E9E;
    color: white;
}

/* 花瓣動畫效果 */
.petals-gained-animation,
.petals-deducted-animation {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2000 !important;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none;
    background: none;
  padding: 0;
    border-radius: 0;
    font-size: unset;
    font-weight: unset;
    box-shadow: none;
    backdrop-filter: none;
    cursor: pointer;
}

.petals-gained-animation.show,
.petals-deducted-animation.show {
    opacity: 1;
    pointer-events: auto;
}

.petals-gained-animation:hover,
.petals-deducted-animation:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.petals-gained-animation:active,
.petals-deducted-animation:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.petals-content {
    background: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
    text-align: center;
    min-width: 300px;
    min-height: 80px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.petals-gained-animation .petals-content {
    background: linear-gradient(135deg, #6ee7b7 0%, #3b82f6 100%);
}

.petals-deducted-animation .petals-content {
    background: linear-gradient(135deg, #f87171 0%, #f472b6 100%);
}

.petals-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

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

.petals-close-btn:active {
    transform: scale(0.9);
}

.petals-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.petals-reason {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.petals-icon {
    font-size: 1.8rem;
    margin: 0;
}

/* 每小時獎勵樣式 */
.hourly-reward-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.hourly-reward-available {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid rgba(34, 197, 94, 0.5);
}

.hourly-reward-waiting {
    background: rgba(156, 163, 175, 0.2);
    border: 2px solid rgba(156, 163, 175, 0.3);
}

.hourly-countdown {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #fbbf24;
    font-weight: bold;
}

.btn-claim-hourly {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-claim-hourly:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
} 

/* 錯誤訊息樣式 - 已移除，統一使用花瓣通知樣式 */
/* 以下樣式已不再使用，保留註解以供參考 */

/* 
.error-message,
.success-message,
.info-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    max-height: 70vh;
    overflow-y: auto;
    pointer-events: auto;
}

.error-message {
    background: linear-gradient(135deg, #f87171 0%, #f472b6 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.success-message {
    background: linear-gradient(135deg, #6ee7b7 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.info-message {
    background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.error-message::before,
.success-message::before,
.info-message::before {
    content: "×";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    z-index: 1;
}

.error-message:hover::before,
.success-message:hover::before,
.info-message:hover::before {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.error-message:active::before,
.success-message:active::before,
.info-message:active::before {
    transform: scale(0.9);
}

.error-message.show,
.success-message.show,
.info-message.show {
    opacity: 1;
}

.error-message:hover,
.success-message:hover,
.info-message:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.error-message:active,
.success-message:active,
.info-message:active {
    transform: translate(-50%, -50%) scale(0.95);
}
*/

/* 花瓣說明對話框樣式 */
.help-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.help-dialog {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid rgba(255, 105, 180, 0.3);
    border-radius: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.help-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 105, 180, 0.2);
}

.help-close-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 105, 180, 0.1);
    border: 1px solid rgba(255, 105, 180, 0.3);
    transition: all 0.2s ease;
}

.help-close-btn:hover {
    background: rgba(255, 105, 180, 0.2);
    transform: scale(1.1);
}

.help-dialog-content {
    padding: 1.5rem;
}

/* 心樂園解鎖通知樣式 */
.heartland-unlock-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.heartland-unlock-content {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 2px solid rgba(255, 105, 180, 0.5);
    border-radius: 2rem;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: heartlandUnlockIn 0.6s ease-out;
}

@keyframes heartlandUnlockIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 心樂園圖片全螢幕查看樣式 */
.heartland-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.heartland-fullscreen-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heartland-fullscreen-content img {
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.heartland-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 9999;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    touch-action: manipulation;
    min-width: 3rem;
    min-height: 3rem;
    box-sizing: border-box;
}

.heartland-close-btn:hover {
    background: rgba(255, 105, 180, 0.8);
    transform: scale(1.1);
}

.heartland-close-btn:active {
    transform: scale(0.95);
}

/* 手機版適配 */
@media (max-width: 768px) {
    .help-dialog {
        margin: 1rem;
        max-height: 85vh;
    }
    
    .help-dialog-header {
        padding: 1rem 1rem 0.75rem 1rem;
    }
    
    .help-dialog-content {
        padding: 1rem;
    }
    
    .heartland-unlock-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    /* 手機版花瓣通知樣式 */
    .petals-content {
        min-width: 280px;
        min-height: 70px;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }
    
    .petals-value {
        font-size: 1.6rem;
    }
    
    .petals-reason {
        font-size: 0.9rem;
    }
    
    .petals-icon {
        font-size: 1.5rem;
    }
    
    .petals-close-btn {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.7rem;
        top: 0.3rem;
        right: 0.3rem;
    }
    
    /* 手機版錯誤訊息樣式 - 已移除，統一使用花瓣通知樣式 */
    /* 以下樣式已不再使用，保留註解以供參考 */
    
    /*
    .error-message,
    .success-message,
    .info-message {
        min-width: 280px;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    top: 50%;
    transform: translate(-50%, -50%);
        max-height: 60vh;
        overflow-y: auto;
        z-index: 3000;
    }
    
    .error-message::before,
    .success-message::before,
    .info-message::before {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.7rem;
        top: 0.3rem;
        right: 0.3rem;
    }
    */
    
    /* 手機版花瓣動畫位置調整 - 保持原有位置 */
    .petals-gained-animation,
    .petals-deducted-animation {
        /* 保持花瓣通知的原有位置 */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 2000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 手機版解鎖通知樣式 */
    .unlock-notice-content {
    padding: 20px;
        max-width: 85%;
        width: 85%;
        max-height: 70vh;
        margin: 10px;
    }
    
    .unlock-notice-icon {
    font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .unlock-notice-text h3 {
        font-size: 1.2rem;
        margin: 0 0 8px 0;
        line-height: 1.3;
    }
    
    .unlock-notice-text p {
        font-size: 0.9rem;
        margin: 0 0 15px 0;
        line-height: 1.4;
    }
    
    .btn-confirm-notice {
        padding: 8px 20px;
        font-size: 0.9rem;
        margin-top: 15px;
    }
} 

/* 心樂園網格樣式 */
.heartland-cell {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* 確保tooltip能正常顯示 */
    z-index: 1;
}

.heartland-cell.locked {
    opacity: 0.3;
    filter: grayscale(100%) brightness(0.5);
    background-color: rgba(0, 0, 0, 0.5);
}

.heartland-cell.unlocked {
    opacity: 1;
    filter: none;
    animation: cellUnlock 0.8s ease-out;
}

.heartland-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

.heartland-cell.locked:hover {
    opacity: 0.5;
    filter: grayscale(70%) brightness(0.7);
}

.heartland-cell.unlocked:hover {
    opacity: 1;
    filter: brightness(1.1);
}

@keyframes cellUnlock {
    0% {
        opacity: 0.3;
        filter: grayscale(100%) brightness(0.5);
        transform: scale(0.8);
    }
    50% {
        opacity: 0.7;
        filter: grayscale(50%) brightness(0.8);
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        filter: none;
        transform: scale(1);
    }
}

/* 移除可能衝突的::before偽元素 */
.heartland-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.5s ease;
    /* 確保不阻擋tooltip */
    pointer-events: none;
}

.heartland-cell.unlocked::before {
    opacity: 0;
}

/* 桌面版心樂園網格樣式 */
#heartland-grid {
    width: 320px;
    height: 320px;
    max-width: 100%;
    max-height: 60vh;
}

/* 寬螢幕優化 */
@media (min-width: 1025px) {
    #heartland-grid {
        width: 360px;
        height: 360px;
        max-width: 100%;
        max-height: 70vh;
    }
}

/* 超大螢幕優化 */
@media (min-width: 1440px) {
    #heartland-grid {
        width: 400px;
        height: 400px;
        max-width: 100%;
        max-height: 80vh;
    }
}

/* 手機版心樂園網格樣式 */
@media (max-width: 768px) {
    #heartland-grid {
        width: 220px;
        height: 220px;
        max-width: 90vw;
        max-height: 45vh;
    }
    
    .heartland-cell {
        transition: all 0.4s ease;
    }
    
    .heartland-cell:hover {
        transform: scale(1.02);
    }
}

/* 平板版心樂園網格樣式 */
@media (max-width: 1024px) and (min-width: 769px) {
    #heartland-grid {
        width: 260px;
        height: 260px;
        max-width: 90vw;
    }
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
    #heartland-grid {
        width: 180px;
        height: 180px;
        max-width: 85vw;
        max-height: 35vh;
    }
    
    .heartland-cell:hover {
        transform: scale(1.01);
    }
}

/* 極小螢幕優化 */
@media (max-width: 360px) {
    #heartland-grid {
        width: 160px;
        height: 160px;
        max-width: 80vw;
        max-height: 30vh;
    }
}

/* 心樂園解鎖順序對話框樣式 */
.heartland-order-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 10px;
}

.heartland-order-content {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
    margin: 0;
    max-height: 90vh;
    overflow-y: auto;
}

.heartland-order-content h3 {
    margin: 0 0 15px 0;
    color: #f472b6;
    font-size: 1.2rem;
}

.heartland-order-content p {
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-size: 0.9rem;
}

.heartland-order-content .grid {
    margin: 15px 0;
    gap: 0.5rem;
}

.heartland-order-content .grid > div {
    transition: all 0.3s ease;
    padding: 0.5rem;
    font-size: 0.7rem;
}

.heartland-order-content .grid > div:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* 手機版解鎖順序對話框樣式 */
@media (max-width: 768px) {
    .heartland-order-overlay {
        padding: 5px;
    }
    
    .heartland-order-content {
        padding: 15px;
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .heartland-order-content h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .heartland-order-content p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .heartland-order-content .grid {
        gap: 0.3rem;
        margin: 10px 0;
    }
    
    .heartland-order-content .grid > div {
        padding: 0.3rem;
        font-size: 0.6rem;
    }
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
    .heartland-order-overlay {
        padding: 2px;
    }
    
    .heartland-order-content {
        padding: 10px;
        max-height: 98vh;
    }
    
    .heartland-order-content h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .heartland-order-content p {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .heartland-order-content .grid {
        gap: 0.2rem;
        margin: 8px 0;
    }
    
    .heartland-order-content .grid > div {
        padding: 0.2rem;
        font-size: 0.55rem;
    }
} 

/* 記憶花園頁面響應式優化 */
@media (max-width: 768px) {
    #unlock-screen {
        padding: 1rem;
        margin: 0;
        max-width: 100%;
    }
    
    #unlock-screen .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    /* 確保心樂園網格在小螢幕上居中 */
    #heartland-artwork-section {
    display: flex;
    justify-content: center;
        padding: 0;
    }
    
    #heartland-artwork-section > div {
    width: 100%;
        max-width: 100%;
        padding: 1rem;
        margin: 0;
    }
    
    /* 確保網格容器不會超出 */
    #heartland-artwork-section .relative.inline-block {
    display: flex;
    justify-content: center;
        width: 100%;
    }
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
    #unlock-screen {
        padding: 0.5rem;
    }
    
    #unlock-screen h2 {
        font-size: 1.5rem;
    }
    
    #heartland-artwork-section > div {
        padding: 0.75rem;
    }
    
    #heartland-artwork-section h3 {
        font-size: 1.1rem;
    }
    
    #heartland-artwork-section p {
        font-size: 0.75rem;
    }
    
    /* 進一步縮小文字間距 */
    #heartland-artwork-section .mt-3 {
        margin-top: 0.5rem;
    }
    
    #heartland-artwork-section .mt-2 {
        margin-top: 0.25rem;
    }
}

/* 極小螢幕優化 */
@media (max-width: 360px) {
    #unlock-screen {
        padding: 0.25rem;
    }
    
    #heartland-artwork-section > div {
        padding: 0.5rem;
    }
    
    #heartland-artwork-section h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    #heartland-artwork-section p {
        font-size: 0.7rem;
        line-height: 1.2;
    }
}

/* 確保網格在小螢幕上不會超出容器 */
@media (max-width: 640px) {
    #careers-grid {
        gap: 0.75rem;
    }
    
    .career-card {
        font-size: 0.9rem;
    }
    
    .career-card .text-xl {
        font-size: 1rem;
    }
    
    .career-card .text-3xl {
    font-size: 1.5rem;
    }
} 

/* 確保心樂園網格完全不會超出容器 */
#heartland-grid {
    box-sizing: border-box;
    max-width: 100%;
    max-height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1px;
}

/* 確保心樂園作品區塊在寬螢幕上正確顯示 */
#heartland-artwork-section {
    display: block;
    width: 100%;
    max-width: 100%;
}

#heartland-artwork-section > div {
    width: 100%;
    max-width: 100%;
    display: block;
}

#heartland-artwork-section .relative.inline-block {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 確保心樂園作品區塊在小螢幕上完全適應 */
@media (max-width: 768px) {
    #heartland-artwork-section {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    #heartland-artwork-section > div {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    #heartland-artwork-section .relative.inline-block {
        width: 100%;
        max-width: 100%;
    display: flex;
    justify-content: center;
        align-items: center;
    }
    
    #heartland-grid {
        width: 220px !important;
        height: 220px !important;
        max-width: 90vw !important;
        max-height: 45vh !important;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    #heartland-grid {
        width: 180px !important;
        height: 180px !important;
        max-width: 85vw !important;
        max-height: 35vh !important;
    }
}

@media (max-width: 360px) {
    #heartland-grid {
        width: 160px !important;
        height: 160px !important;
        max-width: 80vw !important;
        max-height: 30vh !important;
    }
} 

/* 心樂園格子Tooltip樣式 */
.heartland-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 100000; /* 提高z-index確保在最上層 */
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: tooltipFadeIn 0.2s ease-out;
    /* 確保tooltip能正常顯示 */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.heartland-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* 下方顯示的tooltip樣式 */
.heartland-tooltip.tooltip-bottom::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 手機版Tooltip樣式 */
@media (max-width: 768px) {
    .heartland-tooltip {
        font-size: 0.7rem;
        padding: 6px 10px;
        border-radius: 6px;
    }
    
    .heartland-tooltip::after {
        border-width: 4px;
    }
    
    .heartland-tooltip.tooltip-bottom::after {
        border-width: 4px;
    }
}

/* 超小螢幕Tooltip樣式 */
@media (max-width: 480px) {
    .heartland-tooltip {
        font-size: 0.65rem;
        padding: 5px 8px;
        border-radius: 5px;
    }
    
    .heartland-tooltip::after {
        border-width: 3px;
    }
    
    .heartland-tooltip.tooltip-bottom::after {
        border-width: 3px;
    }
} 

/* 心樂園狀態標籤樣式 */
#heartland-status-badge {
    transition: all 0.3s ease;
    z-index: 20;
}

#heartland-status-badge.bg-pink-500\/60 {
    background-color: rgba(236, 72, 153, 0.6);
}

#heartland-status-badge.bg-blue-500\/60 {
    background-color: rgba(59, 130, 246, 0.6);
}

#heartland-status-badge.bg-gray-500\/60 {
    background-color: rgba(107, 114, 128, 0.6);
}

/* 狀態標籤響應式設計 */
@media (max-width: 768px) {
    #heartland-status-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    #heartland-status-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
} 

/* 心樂園網格未解鎖時的視覺效果 */
#heartland-grid:not(.cursor-pointer) {
    cursor: default;
    opacity: 0.8;
}

#heartland-grid:not(.cursor-pointer):hover {
    transform: none;
    opacity: 0.9;
}

/* 心樂園網格完全解鎖時的視覺效果 */
#heartland-grid.cursor-pointer {
    cursor: pointer;
    opacity: 1;
}

#heartland-grid.cursor-pointer:hover {
    transform: scale(1.05);
    opacity: 1;
} 

/* 手機版心樂園全螢幕查看適配 */
@media (max-width: 768px) {
    .heartland-fullscreen-overlay {
        padding: 0.5rem;
    }
    
    .heartland-fullscreen-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .heartland-close-btn {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .heartland-close-btn {
        top: 0.25rem;
        right: 0.25rem;
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
} 

/* 心樂園拼圖動畫樣式 */
.heartland-puzzle-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.heartland-animation-background {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heartland-animation-grid {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.heartland-background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1px;
    opacity: 0.3;
    filter: blur(2px);
    transform: scale(0.8);
    transition: all 0.5s ease-out;
}

.heartland-background-grid.animate-in {
    opacity: 0.6;
    filter: blur(0px);
    transform: scale(1);
}

/* 動畫背景網格單元格樣式 */
.heartland-animation-cell {
    width: 100%;
    height: 100%;
    background-image: url('./heartland.jpg');
    background-size: 400% 400%;
    background-repeat: no-repeat;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.heartland-animation-cell.locked {
    opacity: 0.3;
    filter: grayscale(100%) brightness(0.5);
    background-color: rgba(0, 0, 0, 0.5);
}

.heartland-animation-cell.unlocked {
    opacity: 1;
    filter: none;
}

.puzzle-piece {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    width: 80px;
    height: 80px;
    background-image: url('./heartland.jpg');
    background-size: 400% 400%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 從0.8s改為1.2s */
    z-index: 10;
    /* 添加邊框和視覺效果 */
    border: 3px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
}

.puzzle-piece.falling {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(360deg);
    animation: bounce 1s ease-out; /* 從0.6s改為1s */
}

.puzzle-piece.landed {
    animation: shake 0.5s ease-out; /* 從0.3s改為0.5s */
}

.puzzle-piece.snapped {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.6);
    animation: snap 0.6s ease-out; /* 從0.4s改為0.6s */
    /* 停留時的視覺效果 */
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 15px 40px rgba(255, 105, 180, 0.6),
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    /* 添加脈衝動畫 */
    animation: snap 0.6s ease-out, puzzlePulse 2s ease-in-out infinite;
}

/* 新增：拼圖脈衝動畫 */
@keyframes puzzlePulse {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow: 
            0 15px 40px rgba(255, 105, 180, 0.6),
            0 0 20px rgba(255, 255, 255, 0.3),
            inset 0 0 10px rgba(255, 255, 255, 0.1);
    }
    50% {
        border-color: rgba(255, 105, 180, 0.8);
        box-shadow: 
            0 15px 40px rgba(255, 105, 180, 0.8),
            0 0 30px rgba(255, 105, 180, 0.4),
            inset 0 0 15px rgba(255, 105, 180, 0.2);
    }
}

.animation-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.sparkle-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.sparkle-effect.active {
    opacity: 1;
    animation: sparkle 1.2s ease-out; /* 從0.8s改為1.2s */
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.8) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.glow-effect.active {
    opacity: 1;
    animation: glow 1.5s ease-out; /* 從1s改為1.5s */
}

.character-info {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    opacity: 0;
    animation: slideUp 0.5s ease-out 0.5s forwards;
}

.character-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbb6ce;
    margin-bottom: 0.25rem;
}

.character-type {
    font-size: 1rem;
    color: #f1f5f9;
    opacity: 0.8;
}

.heartland-puzzle-animation.completed {
    /* 移除自動淡出動畫，讓動畫停在最後狀態 */
    /* animation: fadeOut 0.5s ease-out 0.5s forwards; */
}

/* 動畫關鍵幀 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 移除fadeOut動畫，因為我們不需要自動淡出 */
/* @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
} */

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
    40%, 43% {
        transform: translate(-50%, -50%) rotate(360deg) translateY(-15px); /* 增加彈跳高度 */
    }
    70% {
        transform: translate(-50%, -50%) rotate(360deg) translateY(-8px);
    }
    90% {
        transform: translate(-50%, -50%) rotate(360deg) translateY(-3px);
    }
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) scale(1.1); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-50%, -50%) scale(1.1) translateX(-3px); } /* 增加震動幅度 */
    20%, 40%, 60%, 80% { transform: translate(-50%, -50%) scale(1.1) translateX(3px); }
}

@keyframes snap {
    0% { transform: translate(-50%, -50%) scale(1.1); }
    50% { transform: translate(-50%, -50%) scale(1.3); } /* 增加縮放幅度 */
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes sparkle {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0);
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.4); /* 增加閃光大小 */
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(1.8);
    }
}

@keyframes glow {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0);
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2); /* 增加光暈大小 */
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(1.8);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(30px); /* 增加滑動距離 */
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0);
    }
}

/* 新增：pulse動畫用於提示文字 */
@keyframes pulse {
    0%, 100% { 
        opacity: 0.7; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .heartland-animation-background {
        width: 300px;
        height: 300px;
    }
    
    .heartland-animation-grid {
        width: 240px;
        height: 240px;
    }
    
    .puzzle-piece {
        width: 60px;
        height: 60px;
    }
    
    .character-name {
        font-size: 1.25rem;
    }
    
    .character-type {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .heartland-animation-background {
        width: 250px;
        height: 250px;
    }
    
    .heartland-animation-grid {
        width: 200px;
        height: 200px;
    }
    
    .puzzle-piece {
        width: 50px;
        height: 50px;
  }
} 