/* 宠物冒险游戏样式 */
.pet-game-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.pet-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.pet-game-header h2 {
    margin: 0;
    color: #2c3e50;
}

.gold-display {
    font-size: 18px;
    font-weight: bold;
    color: #f39c12;
}

.pet-game-content {
    margin-top: 20px;
}

/* 宠物信息面板 */
.pet-info-panel {
    margin-bottom: 20px;
}

.pet-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    color: white;
}

.pet-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    opacity: 0.9;
}

.pet-details {
    text-align: center;
}

.pet-name {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.pet-level {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 10px 0;
}

.hp-bar-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    height: 20px;
    position: relative;
    margin: 10px 0;
    overflow: hidden;
}

.hp-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.pet-exp {
    font-size: 12px;
    opacity: 0.9;
    margin: 5px 0;
}

.pet-attributes {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    font-size: 14px;
}

/* 主菜单按钮 */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.pet-menu-btn {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.pet-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.pet-menu-btn.battle {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.pet-menu-btn.battle:hover {
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.pet-menu-btn.new-game {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.pet-menu-btn.new-game:hover {
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

/* 宠物列表 */
.pet-list {
    max-height: 400px;
    overflow-y: auto;
}

.pet-list-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.pet-list-name {
    font-weight: bold;
    font-size: 16px;
    margin: 0;
}

.pet-list-level {
    color: #3498db;
}

.pet-list-type {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0;
}

.pet-list-hp {
    font-size: 12px;
    color: #27ae60;
    margin: 0;
}

.select-pet-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #3498db;
    color: white;
    font-weight: bold;
}

.select-pet-btn.current {
    background: #27ae60;
}

/* 背包 */
.backpack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    min-height: 100px;
}

.backpack-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.backpack-item:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.item-icon {
    font-size: 30px;
    display: block;
}

.item-name {
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.item-count {
    font-size: 10px;
    color: #6c757d;
}

.empty-backpack {
    text-align: center;
    color: #6c757d;
    padding: 40px;
}

/* 商店 */
.shop-items {
    max-height: 400px;
    overflow-y: auto;
}

.shop-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.shop-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.shop-item-icon {
    font-size: 24px;
}

.shop-item-name {
    font-weight: bold;
    flex: 1;
    margin-left: 10px;
}

.shop-item-price {
    color: #f39c12;
    font-weight: bold;
}

.shop-item-desc {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0;
}

.buy-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #27ae60;
    color: white;
    font-weight: bold;
}

.buy-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* 战斗场景 */
.battle-arena {
    background: linear-gradient(180deg, #87CEEB 0%, #98D8C8 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 200px;
}

.battle-field {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.enemy-side, .player-side {
    text-align: center;
}

.enemy-pet, .player-pet {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    min-width: 120px;
}

.enemy-name, .player-pet-name {
    font-weight: bold;
    margin: 0 0 10px 0;
}

.hp-bar-container.enemy .hp-bar {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.hp-bar-container.player .hp-bar {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.battle-message {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: white;
    font-weight: bold;
    min-height: 20px;
}

/* 战斗菜单 */
.battle-menu h3 {
    text-align: center;
    margin-bottom: 15px;
}

.skill-wheel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.skill-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.skill-btn:hover {
    transform: scale(1.05);
}

.skill-name {
    font-size: 14px;
}

.skill-info {
    font-size: 10px;
    opacity: 0.8;
}

.battle-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.battle-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.battle-btn:hover {
    transform: scale(1.02);
}

.battle-btn.flee {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.back-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #6c757d;
    color: white;
    font-weight: bold;
}

.back-hint {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
}

/* 存档选择界面 */
.save-select-panel {
    text-align: center;
}

.save-select-panel h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.save-slots {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.save-slot {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
    position: relative;
}

.delete-save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.delete-save-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.save-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.save-slot.empty {
    border-style: dashed;
    opacity: 0.7;
}

.save-slot.empty:hover {
    opacity: 1;
    border-color: #3498db;
}

.save-slot.has-save {
    border-color: #27ae60;
    background: linear-gradient(135deg, #f8f9fa, #e8f5e9);
}

.save-slot.has-save:hover {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}

.save-slot-info {
    text-align: left;
}

.save-slot-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.save-slot-detail {
    font-size: 14px;
    color: #495057;
    margin: 4px 0;
}

.save-slot-time {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
}

.save-slot-empty {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}
