/* 制汤圆游戏区域样式 */
.game-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    justify-content: flex-start;
}

/* 游戏区域 */
.game-area {
    flex: 1;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.game-canvas-container {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    position: relative;
    background: #fff;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 控制面板 */
.game-controls {
    flex: 0 0 220px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.1);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 80px;
}

/* 控制面板内部布局优化 */
.control-group {
    margin-bottom: 0.4rem;
}

.control-group:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.filling-options {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    align-content: start;
}

/* 操作按钮和状态区域容器 */
.controls-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.action-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.game-status {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 0.8rem;
    margin-top: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-size: 0.9rem;
    color: var(--text-color);
}

.status-value {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* 馅料图标尺寸调整 */
.filling-icon {
    width: 35px;
    height: 35px;
}

/* 响应式调整 */
@media (max-width: 1200px) {

    .game-rules,
    .game-container {
        max-width: 900px;
    }

    .game-area {
        max-width: 500px;
    }
}

@media (max-width: 992px) {

    .game-rules,
    .game-container {
        max-width: 400px;
    }

    .game-container {
        flex-direction: column;
        align-items: center;
    }

    .game-controls {
        flex: none;
        width: 100%;
        height: auto;
        position: static;
        margin-top: 1rem;
    }

    .filling-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }

    .action-buttons {
        flex-direction: row;
        gap: 0.6rem;
        margin-top: 0.8rem;
    }

    .filling-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .game-container {
        max-width: 350px;
    }

    .filling-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .filling-icon {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .game-content {
        padding: 1rem;
    }

    .game-container {
        max-width: 300px;
    }

    .control-group h3 {
        font-size: 0.95rem;
    }

    .filling-name {
        font-size: 0.8rem;
    }

    .status-text {
        font-size: 0.8rem;
    }

    .score {
        font-size: 1.1rem;
    }
}

.control-group h3 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid rgba(231, 76, 60, 0.1);
}

.filling-option {
    position: relative;
    padding: 0.2rem;
    border-radius: 0.6rem;
    background: #fff;
    border: 2px solid rgba(231, 76, 60, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filling-option.active {
    border-color: var(--primary-color);
    background: rgba(231, 76, 60, 0.05);
}

.filling-name {
    font-size: 0.85rem;
    margin-top: 0.3rem;
    color: var(--text-color);
}

.action-buttons .btn {
    width: 100%;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* 游戏规则样式 */
.game-rules {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 1.2rem;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.1);
    text-align: left;
}

.game-rules h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(231, 76, 60, 0.1);
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rules-content p {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
    padding-left: 1.5rem;
    position: relative;
}

.rules-content p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-rules {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .game-rules h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .rules-content p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .game-rules {
        margin-bottom: 1rem;
        padding: 0.8rem;
    }

    .game-rules h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .rules-content p {
        font-size: 0.9rem;
        padding-left: 1.2rem;
    }
}

/* 连击显示 */
.combo-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
    white-space: nowrap;
}

.combo-display.show {
    opacity: 1;
    transform: translate(-50%, -100%);
}

/* 特效状态指示器 */
.effects-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.effect-indicator {
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    color: #fff;
    background: var(--primary-color);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.effect-indicator.active {
    opacity: 1;
}

/* 特殊效果说明样式 */
.special-effects {
    margin: 0.5rem 0 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.effect-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.effect-name {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 4.5rem;
}

.effect-desc {
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .special-effects {
        margin: 0.4rem 0 0.8rem 1.5rem;
    }

    .effect-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .special-effects {
        margin: 0.3rem 0 0.6rem 1.2rem;
    }

    .effect-item {
        font-size: 0.85rem;
    }

    .effect-name {
        min-width: 4rem;
    }
}

/* 馅料预览样式 */
.filling-preview {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.8rem;
}

.filling-preview-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 0.6rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.filling-preview-item:hover {
    transform: translateX(5px);
}

.filling-preview-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filling-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.filling-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border-radius: 50%;
}

/* 各种馅料的颜色样式 */
.filling-preview-icon.black-sesame .filling-inner {
    background: #2c3e50;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, rgba(44, 62, 80, 1) 60%);
}

.filling-preview-icon.peanut .filling-inner {
    background: #d35400;
    background-image: linear-gradient(45deg, rgba(211, 84, 0, 1) 0%, rgba(230, 126, 34, 1) 100%);
}

.filling-preview-icon.red-bean .filling-inner {
    background: #c0392b;
    background-image: radial-gradient(circle at 30% 30%, rgba(192, 57, 43, 1) 0%, rgba(169, 50, 38, 1) 100%);
}

.filling-preview-icon.lotus .filling-inner {
    background: #f39c12;
    background-image: linear-gradient(135deg, rgba(243, 156, 18, 1) 0%, rgba(241, 196, 15, 1) 100%);
}

.filling-preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.filling-preview-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-color);
}

.filling-preview-effect {
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.8;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .filling-preview {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .filling-preview-item {
        width: calc(50% - 0.4rem);
    }
}

@media (max-width: 768px) {
    .filling-preview-item {
        width: 100%;
    }
}

/* 游戏按钮样式 */
.game-buttons {
    width: 100%;
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem 0 0;
}

.game-buttons .btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 2rem;
    min-width: 120px;
    transition: all 0.3s ease;
}

.game-buttons .btn-primary {
    background-color: var(--primary-color);
    border: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.game-buttons .btn-primary:hover {
    background-color: rgba(231, 76, 60, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.game-buttons .btn-outline {
    background-color: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.game-buttons .btn-outline:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-buttons .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .game-buttons {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 0 0;
    }

    .game-buttons .btn {
        width: 100%;
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .combo-display {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .combo-display {
        font-size: 1.8rem;
    }
}