/* 詩詞展示 */
.poem {
    font-style: italic;
    line-height: 1.8;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    position: relative;
}

.poem::before,
.poem::after {
    content: '"';
    font-family: serif;
    position: absolute;
    font-size: 40px;
    opacity: 0.2;
}

.poem::before {
    top: 0;
    left: 10px;
}

.poem::after {
    bottom: -20px;
    right: 10px;
}

@media (prefers-color-scheme: dark) {
    .poem {
        background: rgba(60, 60, 60, 0.7);
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    }
}

/* 警幻對話 */
.warning-dream {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin: 25px 0;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    font-size: 18px;
    line-height: 1.7;
}

.warning-dream::before,
.warning-dream::after {
    content: '"';
    font-family: serif;
    font-size: 60px;
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
}

.warning-dream::before {
    top: 5px;
    left: 15px;
}

.warning-dream::after {
    bottom: -30px;
    right: 15px;
}

/* 白茫茫效果 */
@keyframes fadeWhite {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

.white-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 5s ease;
}

.white-fade.active {
    opacity: 1;
    pointer-events: auto;
}

.white-fade-text {
    font-size: 36px;
    color: rgba(0, 0, 0, 0.7);
    text-align: center;
    font-style: italic;
}

@media (prefers-color-scheme: dark) {
    .white-fade {
        background: #181818;
    }
    
    .white-fade-text {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* 教學系統 */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tutorial-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tutorial-highlight {
    position: absolute;
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    pointer-events: none;
    z-index: 2001;
    transition: all 0.5s ease;
}

.tutorial-tooltip {
    position: absolute;
    background: white;
    padding: 15px;
    border-radius: 10px;
    max-width: 300px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2002;
    animation: tooltipPulse 2s infinite;
    pointer-events: auto;
}

@keyframes tooltipPulse {
    0% { box-shadow: 0 5px 20px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 5px 30px rgba(93, 92, 222, 0.5); }
    100% { box-shadow: 0 5px 20px rgba(0,0,0,0.3); }
}

.tutorial-tooltip-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #5a3921;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-tooltip-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.tutorial-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-progress {
    font-size: 12px;
    color: #999;
}

.tutorial-button {
    padding: 8px 15px;
    background: #5D5CDE;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tutorial-button:hover {
    background: #7170E3;
    transform: translateY(-2px);
}

.tutorial-button.skip {
    background: transparent;
    color: #999;
    text-decoration: underline;
}

.tutorial-button.skip:hover {
    color: #5D5CDE;
    background: transparent;
    transform: none;
}

@media (prefers-color-scheme: dark) {
    .tutorial-tooltip {
        background: #333;
        color: #eee;
    }
    
    .tutorial-tooltip-title {
        color: #d4b483;
    }
    
    .tutorial-tooltip-content {
        color: #bbb;
    }
    
    .tutorial-button {
        background: #8B4513;
    }
    
    .tutorial-button:hover {
        background: #a0522d;
    }
    
    .tutorial-button.skip {
        color: #bbb;
    }
    
    .tutorial-button.skip:hover {
        color: #d4b483;
    }
}

/* 提示系統 */
.hint-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 300px;
    max-width: 80vw;
    overflow: hidden;
}

.hint {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(120%);
    transition: transform 0.5s ease;
    position: relative;
    border-left: 4px solid #5D5CDE;
}

.hint.show {
    transform: translateX(0);
}

.hint-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #5a3921;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-icon {
    font-size: 18px;
    color: #5D5CDE;
}

.hint-content {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.hint-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hint-close:hover {
    color: #333;
    transform: scale(1.1);
}

.hint-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #5D5CDE;
    width: 100%;
    transform-origin: left;
    animation: hintProgress 6s linear forwards;
}

@keyframes hintProgress {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

@media (prefers-color-scheme: dark) {
    .hint {
        background: rgba(40, 40, 40, 0.95);
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
        border-left: 4px solid #8B4513;
    }
    
    .hint-title {
        color: #d4b483;
    }
    
    .hint-icon {
        color: #8B4513;
    }
    
    .hint-content {
        color: #bbb;
    }
    
    .hint-close:hover {
        color: #ddd;
    }
    
    .hint-progress {
        background: #8B4513;
    }
}

/* 主選單和推薦行動 */
.main-menu {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.menu-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #5D5CDE;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1) rotate(90deg);
    background: #7170E3;
}

.menu-items {
    position: absolute;
    bottom: 60px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.menu-open .menu-items {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 200px;
}

.menu-item:hover {
    transform: translateX(5px);
    background: #f0f0f0;
}

.menu-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #5D5CDE;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.menu-item-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* 推薦行動氣泡 */
.action-bubble {
    position: fixed;
    z-index: 990;
    background: white;
    padding: 12px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 250px;
    animation: bubble-bounce 2s infinite;
}

@keyframes bubble-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.action-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.bubble-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #5D5CDE;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.bubble-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.bubble-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.bubble-close:hover {
    background: rgba(0,0,0,0.2);
    color: #333;
}

@media (prefers-color-scheme: dark) {
    .menu-toggle {
        background: #8B4513;
    }
    
    .menu-toggle:hover {
        background: #a0522d;
    }
    
    .menu-item {
        background: #333;
        box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    }
    
    .menu-item:hover {
        background: #444;
    }
    
    .menu-item-icon {
        background: #8B4513;
    }
    
    .menu-item-text {
        color: #eee;
    }
    
    .action-bubble {
        background: #333;
        box-shadow: 0 3px 15px rgba(0,0,0,0.4);
    }
    
    .action-bubble:hover {
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    }
    
    .bubble-icon {
        background: #8B4513;
    }
    
    .bubble-text {
        color: #eee;
    }
    
    .bubble-close {
        background: rgba(255,255,255,0.1);
        color: #aaa;
    }
    
    .bubble-close:hover {
        background: rgba(255,255,255,0.2);
        color: #eee;
    }
}

