/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    background: url('../images/background.jpg')  no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
}
 
.game-container {
    width: 90%;
    max-width: 500px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
 
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
 
.controls {
    display: flex;
    gap: 10px;
}
 
.game-info {
    display: flex;
    gap: 15px;
}
 
.game-info div {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}
 
.game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
}
 
.gem {
    width: 100%;
    aspect-ratio: 1/1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    transform: scale(1);
}
 
.gem.selected  {
    transform: scale(0.95);
    box-shadow: 0 0 10px gold;
}
 
.gem.dragging  {
    opacity: 0.8;
}
 
/* 宝石动画效果 */
.gem-pop {
    transform: scale(1.3) !important;
    transition: transform 0.3s ease-out;
    z-index: 10;
}
 
.gem-explode {
    transform: scale(1.6) !important;
    opacity: 0;
    background-image: url('../images/explosion.png')  !important;
    transition: all 0.3s ease-out;
    z-index: 20;
}
 
.target-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}
 
.target-display img {
    width: 30px;
    height: 30px;
}
 
/* 按钮样式 */
button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}
 
button:hover {
    background-color: #3a5a8f;
}
 
/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 100;
}
 
.modal-content {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    width: 80%;
}
 
.modal h2 {
    margin-top: 0;
    color: gold;
}
 
.modal button {
    margin: 10px 5px;
}
 
/* 电脑端优化 - 媒体查询 */
@media (min-width: 768px) {
    .game-container {
        max-width: 750px; /* 放大1.5倍 */
        padding: 22px; /* 等比例放大 */
    }
    
    .game-board {
        gap: 8px; /* 增加宝石间距 */
        padding: 15px; /* 等比例放大 */
    }
    
    .gem {
        min-width: 60px; /* 增大宝石尺寸 */
        min-height: 60px;
    }
    
    .game-header {
        margin-bottom: 22px; /* 等比例放大 */
    }
    
    .controls {
        gap: 15px; /* 等比例放大 */
    }
    
    .game-info {
        gap: 22px; /* 等比例放大 */
    }
    
    .game-info div {
        padding: 8px 15px; /* 等比例放大 */
        font-size: 16px; /* 增大字体 */
    }
    
    button {
        padding: 12px 22px; /* 等比例放大 */
        font-size: 16px; /* 增大字体 */
    }
    
    .target-display {
        margin-top: 22px; /* 等比例放大 */
    }
    
    .target-display img {
        width: 45px; /* 等比例放大 */
        height: 45px;
    }
    
    /* 动画效果相应放大 */
    .gem-pop {
        transform: scale(1.4) !important;
    }
    
    .gem-explode {
        transform: scale(1.7) !important;
    }
}
 
/* 手机端保持原有样式 */
@media (max-width: 767px) {
    .gem {
        min-width: 40px;
        min-height: 40px;
    }
}