/* /public/css/minigames/watermelon-game.css */

/**
 * 수박게임 스타일
 */

.watermelon-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 2px solid var(--surface-light);
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.game-score {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.game-next-fruit {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--surface-light);
}

#next-fruit-display {
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

#watermelon-canvas-container {
    position: relative;
    display: inline-block;
}

#watermelon-canvas {
    border: 3px solid var(--surface-light);
    border-radius: 12px;
    background: #FFF8E1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
    max-width: 100%;
    height: auto;
    touch-action: none;
    user-select: none;
}

/* 게임 중일 때 커서를 더 명확하게 */
#watermelon-canvas.playing {
    cursor: pointer;
}

.game-controls {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.game-controls .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.game-instructions {
    text-align: center;
    max-width: 400px;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border: 2px solid var(--surface-light);
}

.game-instructions p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.85rem;
}

.game-instructions strong {
    color: var(--text-primary);
}

.error-message {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
    border: 2px solid var(--error);
}

.error-message p {
    margin: 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.error-message .btn {
    margin-top: 1rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .watermelon-game-container {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .game-header {
        max-width: 100%;
        padding: 0.5rem 0.75rem;
    }
    
    .game-title {
        font-size: 1.25rem;
    }
    
    .game-score {
        font-size: 1rem;
    }
    
    .game-next-fruit {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    #next-fruit-display {
        font-size: 1.3rem;
    }
    
    .game-controls {
        max-width: 100%;
    }
    
    .game-controls .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .game-instructions {
        max-width: 100%;
        padding: 0.75rem;
    }
    
    .game-instructions p {
        font-size: 0.8rem;
        margin: 0.3rem 0;
    }
}

/* 작은 모바일 화면 */
@media (max-width: 480px) {
    .game-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .game-title {
        font-size: 1.1rem;
    }
    
    .game-score {
        font-size: 0.95rem;
    }
    
    .game-next-fruit {
        font-size: 0.9rem;
    }
    
    #next-fruit-display {
        font-size: 1.2rem;
    }
}
