/* 文字冒险世界 - H5版本样式 */

/* 基础样式已在index.html的style标签中定义 */
/* 这里可以添加额外的样式 */

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-in {
    animation: slideIn 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .header .logo {
        font-size: 2rem;
    }
    
    .header .title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* 打印样式 */
@media print {
    .btn, .quick-actions, .footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --text-color: #000000;
        --background-color: #ffffff;
    }
    
    .card {
        border: 2px solid var(--primary-color);
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 游戏特定样式 */
.choice-btn {
    text-align: left;
    white-space: normal;
    height: auto;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.choice-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 173, 181, 0.4) !important;
}

/* 加载状态 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 属性变化动画 */
.attribute-change {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 173, 181, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 1000;
    font-weight: bold;
    animation: attributeChange 3s ease forwards;
}

@keyframes attributeChange {
    0% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* 进度指示器 */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
}

.progress-step.active {
    background: var(--primary-color);
    color: white;
}

.progress-step.completed {
    background: rgba(0, 173, 181, 0.3);
    color: var(--primary-color);
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

.progress-step:last-child::after {
    display: none;
}

/* 成就徽章 */
.achievement-badge {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 10px;
    box-shadow: 0 4px 8px rgba(255, 149, 0, 0.3);
}

.achievement-badge.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
}

.achievement-badge.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
}