/* 按钮系统 */
.btn-primary {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 2px solid var(--primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

/* 开始界面滚动支持 */
#start-screen {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 40px;
}

/* 游戏标题 */
.game-title {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 20px;
    flex-shrink: 0;
}

.game-title h1 {
    font-size: 36px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.game-title p {
    color: var(--text-muted);
    font-size: 16px;
}

/* 角色选择区域 */
.character-select {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    overflow-y: auto;
    padding-bottom: 20px;
    align-items: center;
}

.character-select h3 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 20px;
}

/* 职业卡片容器 */
.class-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

/* 职业卡片 */
.class-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.class-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    background: rgba(99, 102, 241, 0.1);
}

.class-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.class-icon {
    font-size: 48px;
    margin-bottom: 5px;
}

.class-card h4 {
    font-size: 18px;
    color: var(--text);
    margin: 0;
}

.class-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.skill-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
}

/* 输入框样式 */
#player-name {
    width: 100%;
    max-width: 300px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius);
    color: white;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    text-align: center;
    margin: 10px 0;
}

#player-name:focus {
    border-color: var(--primary);
}

#player-name::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* 卡片 */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    width: 100%;
}

/* 血条/蓝条 */
.hp-bar, .mp-bar, .enemy-hp-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.enemy-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transition: width 0.3s ease;
}

/* 通用输入框 */
input[type="text"] {
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius);
    color: white;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary);
}

/* Toast提示 */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideDown 0.3s ease;
    border-left: 4px solid var(--primary);
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    word-break: break-word;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

/*----------补充部分-------------*/
/* ==================== 弹窗系统 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 100vh;
    overflow-y: auto;
    border: 2px solid #3b82f6;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    text-align: center;
    color: #fbbf24;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.modal-subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ==================== 学习背包 ==================== */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.item-card {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.2);
}

.item-card.empty {
    opacity: 0.4;
    cursor: not-allowed;
}

.item-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.item-name {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
}

.item-count {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.item-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.2;
}

.inventory-tip {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-top: 12px;
}

/* ==================== 技能系统 ==================== */
.player-gold-display {
    text-align: center;
    font-size: 1.1rem;
    color: #fbbf24;
    margin-bottom: 16px;
    padding: 8px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    font-weight: bold;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 16px 0;
}

.skill-card {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid #8b5cf6;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: all 0.3s;
}

.skill-card.locked {
    opacity: 0.5;
    border-color: #64748b;
    background: rgba(100, 116, 139, 0.1);
}

.skill-card.maxed {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.skill-icon {
    font-size: 1.5rem;
}

.skill-name {
    font-weight: bold;
    color: #fff;
    font-size: 1.1rem;
}

.skill-level {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.skill-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.btn-upgrade {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upgrade:disabled {
    background: #64748b;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-upgrade:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.unlock-require {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
    font-style: italic;
}

.maxed-badge {
    text-align: center;
    color: #fbbf24;
    font-weight: bold;
    padding: 8px;
}

.skills-tip {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

/* ==================== 单词收藏 ==================== */
.collection-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #3b82f6;
    color: white;
}

.collection-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-tip {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 8px;
}

.word-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.word-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.word-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.word-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.word-phonetic {
    color: #94a3b8;
    font-size: 0.9rem;
}

.audio-btn-small {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.audio-btn-small:hover {
    background: rgba(59, 130, 246, 0.4);
}

.word-meaning {
    color: #cbd5e1;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.word-exam-point {
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #fbbf24;
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    margin-top: 8px;
}

.point-tag {
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 8px;
}

.point-content {
    color: #94a3b8;
    font-size: 0.85rem;
}

.collection-stats {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ==================== 战斗进度 ==================== */
.battle-progress {
    background: rgba(0,0,0,0.3);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* ==================== 填空题样式 ==================== */
.fill-blank-box {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    text-align: center;
}

.blank-sentence {
    font-size: 1.1rem;
    color: #0066CC;
    line-height: 1.8;
    margin-bottom: 12px;
    font-weight: 500;
}

.blank-hint {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ==================== 考点标签 ==================== */
.exam-point-tag {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid #fbbf24;
    border-radius: 20px;
    padding: 6px 14px;
    margin: 12px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.exam-point-tag:hover {
    background: rgba(251, 191, 36, 0.25);
    transform: scale(1.02);
}

.tag-label {
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: bold;
}

.tag-rate {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================== 收藏按钮 ==================== */
.collect-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collect-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

/* ==================== 伤害数字 ==================== */
.damage-number {
    position: absolute;
    animation: floatUp 1s ease-out forwards;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@keyframes floatUp {
    0% { transform: translate(-50%, 0) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -30px) scale(1.3); opacity: 0.8; }
    100% { transform: translate(-50%, -60px) scale(1.5); opacity: 0; }
}

/* ==================== 战斗统计 ==================== */
.battle-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.bonus-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #fbbf24;
    font-weight: bold;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 8px;
}

/* ==================== 关闭按钮 ==================== */
.btn-close {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-close:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* ==================== 滚动条美化 ==================== */
.collection-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.collection-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
}

.collection-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.collection-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}


/* 响应式设计 */
@media (max-width: 768px) {
    .game-title h1 {
        font-size: 28px;
    }
    
    .class-options {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .class-card {
        padding: 15px;
        flex-direction: row;
        text-align: left;
        gap: 15px;
    }
    
    .class-icon {
        font-size: 36px;
        margin-bottom: 0;
    }
    
    .btn-primary {
        padding: 14px 28px;
        font-size: 16px;
    }
}
/* 攻略按钮特殊样式 */
#guide-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
}

#guide-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
@media (max-width: 480px) {
    #start-screen {
        padding: 15px;
        padding-bottom: 30px;
    }
    
    .game-title {
        margin-top: 10px;
        margin-bottom: 20px;
    }
    
    .game-title h1 {
        font-size: 24px;
    }
    
    .character-select h3 {
        font-size: 18px;
    }
    
    .class-card h4 {
        font-size: 16px;
    }
    
    .class-card p {
        font-size: 12px;
    }
}