/* 移动端适配样式 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        gap: 20px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .main-menu {
        padding: 20px;
        width: 95%;
        max-width: 100%;
        margin: 0 auto;
    }

    .main-menu h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }

    .menu-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .menu-button {
        padding: 15px 30px;
        font-size: 1.2em;
        width: 100%;
    }

    .spin-button {
        padding: 15px 30px;
        font-size: 18px;
        margin-top: 20px;
        border-radius: 30px;
        min-width: 150px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }

    .suggestion-form {
        width: 90%;
        padding: 20px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px;
        font-size: 14px;
    }

    .submit-button,
    .back-button {
        padding: 10px;
        font-size: 14px;
    }

    /* 游戏模式选择器 */
    .game-mode-selector {
        flex-direction: column;
        gap: 10px;
    }

    .mode-card {
        width: 100%;
    }

    /* 多人模式 */
    .players-list {
        max-height: 200px;
    }

    .player-item {
        padding: 8px;
    }

    /* 计时挑战 */
    .timer-display {
        font-size: 2em;
    }

    /* 难度选择 */
    .difficulty-buttons {
        flex-direction: column;
    }

    /* 结果弹窗 */
    .result-modal .modal-content {
        width: 90%;
        padding: 15px;
    }
    
    /* 多人游戏模式优化 */
    .multiplayer-game-container {
        padding: 10px;
    }
    
    .game-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-option {
        width: 100%;
        max-width: 100%;
    }
    
    .game-in-progress .game-header {
        flex-direction: column;
        align-items: center;
    }
    
    /* 反应游戏优化 */
    .reaction-game-container {
        padding: 10px;
    }
    
    .reaction-area {
        height: 180px;
    }
    
    .attempts-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    /* 跳一跳游戏优化 */
    .jump-game-container {
        padding: 10px;
    }
    
    .game-area {
        height: 250px;
        touch-action: manipulation;
    }
    
    .power-bar-container {
        width: 90%;
    }
    
    /* 游戏结果弹窗优化 */
    .result-content {
        padding: 20px;
        width: 95%;
    }
    
    /* 触摸优化 */
    .reaction-area, .game-area, .game-option, .start-button, .continue-button {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 确保足够大的触摸目标 */
    button, .player-item, .attempt-item {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    body {
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .container {
        padding: 5px;
        width: 100%;
    }
    
    .main-menu {
        width: 100%;
        padding: 15px 10px;
        border-radius: 15px;
    }
    
    .main-menu h1 {
        font-size: 1.8em;
    }

    .spin-button {
        padding: 10px 20px;
        font-size: 16px;
        margin-top: 15px;
        min-width: 100px;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* 触摸交互优化 */
@media (hover: none) and (pointer: coarse) {
    .menu-button,
    .spin-button,
    .submit-button,
    .back-button,
    .mode-button,
    .difficulty-button {
        padding-top: 15px;
        padding-bottom: 15px;
        min-height: 50px; /* 确保触摸目标足够大 */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    /* 增加触摸反馈 */
    .menu-button:active,
    .submit-button:active,
    .back-button:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    .spin-button:active {
        transform: translate(-50%, -50%) scale(0.95);
        transition: transform 0.1s;
    }
}

/* 新增游戏玩法样式 */
.game-mode-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mode-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    width: 150px;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.mode-card.active {
    border: 2px solid #ff4d4d;
}

.mode-icon {
    font-size: 2em;
    margin-bottom: 10px;
    color: #ff4d4d;
}

/* 多人模式 */
.players-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.players-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.player-name {
    font-weight: bold;
}

.player-score {
    background: #ff4d4d;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
}

/* 计时挑战 */
.timer-container {
    text-align: center;
    margin-bottom: 20px;
}

.timer-display {
    font-size: 3em;
    font-weight: bold;
    color: #ff4d4d;
    margin-bottom: 10px;
}

/* 难度选择 */
.difficulty-selector {
    text-align: center;
    margin-bottom: 20px;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.difficulty-button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.difficulty-button.easy {
    background: #4CAF50;
    color: white;
}

.difficulty-button.medium {
    background: #FFC107;
    color: white;
}

.difficulty-button.hard {
    background: #ff4d4d;
    color: white;
}

.difficulty-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* 社交分享 */
.share-container {
    text-align: center;
    margin-top: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.share-button.wechat {
    background: #07C160;
}

.share-button.weibo {
    background: #E6162D;
}

.share-button.qq {
    background: #12B7F5;
}

/* 转盘移动端额外优化 */
@media (max-width: 768px) {
    .wheel-pointer {
        top: -15px;
        width: 30px;
        height: 30px;
    }
    
    .back-button {
        margin-top: 30px;
        display: block;
        width: 120px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .result-modal .modal-content {
        padding: 20px;
    }
}